]> git.sesse.net Git - ffmpeg/commitdiff
qsvdec: Fix running with assert_level > 0
authorMark Thompson <sw@jkqxz.net>
Sun, 11 Nov 2018 15:32:15 +0000 (15:32 +0000)
committerMark Thompson <sw@jkqxz.net>
Sun, 9 Dec 2018 18:49:06 +0000 (18:49 +0000)
Assertion avctx->codec_id != AV_CODEC_ID_NONE failed at src/libavcodec/parser.c:128

The setting on the internal AVCodecContext used for parsing only is
otherwise irrelevant, so just set it to avoid the assert.

libavcodec/qsvdec.c

index 6753e596a15d6c0d8e553adf5876d4d52b34dd3c..4a0be811fb92dba9d921b9c20c245658c43173bf 100644 (file)
@@ -501,6 +501,8 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
         if (!q->avctx_internal)
             return AVERROR(ENOMEM);
 
+        q->avctx_internal->codec_id = avctx->codec_id;
+
         q->parser = av_parser_init(avctx->codec_id);
         if (!q->parser)
             return AVERROR(ENOMEM);