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.
This commit is contained in:
Mark Thompson 2018-11-11 15:32:15 +00:00
parent d12d4d4515
commit 34cab70818
1 changed files with 2 additions and 0 deletions

View 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);