]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qsvdec.c
lavc/qsvdec: fix hevc level incorrectly map
[ffmpeg] / libavcodec / qsvdec.c
index 2a8a032111d7f9f121be26485e32e2b31029afcc..46aa2d681475701c6697335521627a372e39d59a 100644 (file)
@@ -203,7 +203,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
 
     param.mfx.CodecId      = ret;
     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.CodecLevel   = ff_qsv_level_to_mfx(avctx->codec_id, avctx->level);
 
     param.mfx.FrameInfo.BitDepthLuma   = desc->comp[0].depth;
     param.mfx.FrameInfo.BitDepthChroma = desc->comp[0].depth;