summaryrefslogtreecommitdiff
path: root/libavcodec/qsvdec.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-11-11 15:32:15 +0000
committerMark Thompson <sw@jkqxz.net>2018-12-09 18:49:06 +0000
commit34cab708189bdde8f59543a885313928a980564d (patch)
tree6eb4fe44ebf2da2263bb4b1c9bf7272d24934b3e /libavcodec/qsvdec.c
parentd12d4d45153e45e5b91ee079045f8fcde3537b33 (diff)
qsvdec: Fix running with assert_level > 0
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.
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 6753e596a1..4a0be811fb 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -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);