[FFmpeg-cvslog] libopenh264dec: Export the decoded profile and level in AVCodecContext
Martin Storsjö
git at videolan.org
Tue Sep 11 20:02:28 EEST 2018
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Aug 31 12:25:40 2018 +0300| [83678dbbae64ad8c501e0c732c1117e642c25dae] | committer: Martin Storsjö
libopenh264dec: Export the decoded profile and level in AVCodecContext
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83678dbbae64ad8c501e0c732c1117e642c25dae
---
libavcodec/libopenh264dec.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index 5990a72ff9..60e4b028ec 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -95,6 +95,9 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data,
int linesize[3];
AVFrame *avframe = data;
DECODING_STATE state;
+#if OPENH264_VER_AT_LEAST(1, 7)
+ int opt;
+#endif
if (!avpkt->data) {
#if OPENH264_VER_AT_LEAST(1, 9)
@@ -136,6 +139,12 @@ FF_DISABLE_DEPRECATION_WARNINGS
avframe->pkt_pts = avpkt->pts;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
+#if OPENH264_VER_AT_LEAST(1, 7)
+ (*s->decoder)->GetOption(s->decoder, DECODER_OPTION_PROFILE, &opt);
+ avctx->profile = opt;
+ (*s->decoder)->GetOption(s->decoder, DECODER_OPTION_LEVEL, &opt);
+ avctx->level = opt;
+#endif
*got_frame = 1;
return avpkt->size;
More information about the ffmpeg-cvslog
mailing list