diff options
author | Mark Thompson <sw@jkqxz.net> | 2016-10-26 21:26:10 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2016-11-14 19:38:19 +0000 |
commit | cd1047f3911fa0d34c86f470537f343d23c8b956 (patch) | |
tree | bbc04c4d81d588b0e3d68927997def6efe950243 /libavcodec/qsvdec.c | |
parent | 3297577f3eac1c87d48dedd527942de2bd28e7a5 (diff) |
qsvdec: Pass the correct profile to libmfx
This was correct for H.26[45], because libmfx uses the same values
derived from profile_idc and the constraint_set flags, but it is
wrong for other codecs.
Also avoid passing FF_LEVEL_UNKNOWN (-99) as the level, as this is
certainly invalid.
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r-- | libavcodec/qsvdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 6131100518..9b5dc1df81 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -144,8 +144,8 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q) return ret; param.mfx.CodecId = ret; - param.mfx.CodecProfile = avctx->profile; - param.mfx.CodecLevel = avctx->level; + param.mfx.CodecProfile = ff_qsv_profile_to_mfx(avctx->codec_id, avctx->profile); + param.mfx.CodecLevel = avctx->level == FF_LEVEL_UNKNOWN ? MFX_LEVEL_UNKNOWN : avctx->level; param.mfx.FrameInfo.BitDepthLuma = desc->comp[0].depth; param.mfx.FrameInfo.BitDepthChroma = desc->comp[0].depth; |