Message ID | 20210219050920.1730759-1-wenbin.chen@intel.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] libavcodec/qsvdec: skip non-key frame after "seek" function | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index d10f90a0db..8133406085 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -616,6 +616,13 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q, } if (!q->initialized) { + + /* skip non-key frame when decoder is reinitialized. + Adding before will skip all the non-key frames so add + it here */ + if (ret < 0) + return ret; + ret = qsv_decode_init_context(avctx, q, ¶m); if (ret < 0) goto reinit_fail;