There are frame droppings in frc while converting into a lower framerate,
and MSDK returns ERROR_MORE_DATA which should be ignored.

Reported-by: Gupta, Pallavi <pallavi.gu...@intel.com>
Signed-off-by: Linjie Fu <linjie...@intel.com>
---
Could be reproduced by:
ffmpeg -hwaccel qsv -c:v hevc_qsv -i input_25fps.h265
        -vf vpp_qsv=framerate=20
        -c:v hevc_qsv -b:v 4M 4M20FPS.mp4

 libavfilter/vf_vpp_qsv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index 8585874..0218c2a 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -476,6 +476,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*picref)
 
     if (vpp->qsv) {
         ret = ff_qsvvpp_filter_frame(vpp->qsv, inlink, picref);
+        /* ignore the EAGAIN caused by frame dropping in frc */
+        if (ret == AVERROR(EAGAIN))
+            ret = av_cmp_q(vpp->framerate, inlink->frame_rate) < 0 ? 0 : ret;
         av_frame_free(&picref);
     } else {
         if (picref->pts != AV_NOPTS_VALUE)
-- 
2.7.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to