1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit '83678dbbae64ad8c501e0c732c1117e642c25dae'

* commit '83678dbbae64ad8c501e0c732c1117e642c25dae':
  libopenh264dec: Export the decoded profile and level in AVCodecContext

Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2018-09-11 13:57:23 -03:00
commit ff44c2d4f4

View File

@ -95,6 +95,9 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data,
int ret, linesize[3]; int ret, linesize[3];
AVFrame *avframe = data; AVFrame *avframe = data;
DECODING_STATE state; DECODING_STATE state;
#if OPENH264_VER_AT_LEAST(1, 7)
int opt;
#endif
if (!avpkt->data) { if (!avpkt->data) {
#if OPENH264_VER_AT_LEAST(1, 9) #if OPENH264_VER_AT_LEAST(1, 9)
@ -137,6 +140,12 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data,
FF_DISABLE_DEPRECATION_WARNINGS FF_DISABLE_DEPRECATION_WARNINGS
avframe->pkt_pts = avpkt->pts; avframe->pkt_pts = avpkt->pts;
FF_ENABLE_DEPRECATION_WARNINGS 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 #endif
*got_frame = 1; *got_frame = 1;