From: Piotr BrzeziƄski Date: Thu, 9 Feb 2023 17:51:30 +0000 (+0100) Subject: vtdec: Fix not waiting for async frames when flushing X-Git-Tag: 1.22.7~498 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fd9c823602bb81daf59795b3d0768f558071c08;p=platform%2Fupstream%2Fgstreamer.git vtdec: Fix not waiting for async frames when flushing This was causing incorrect output when seeking, especially when used with a multithreaded source like `videotestsrc n-threads=2`. It should now correctly wait for frames still being processed by VT while vtdec is flushing. Part-of: --- diff --git a/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c b/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c index 6a459e8..5cb2ae5 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c +++ b/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c @@ -1033,7 +1033,7 @@ gst_vtdec_push_frames_if_needed (GstVtdec * vtdec, gboolean drain, } } - if (drain) + if (drain || flush) VTDecompressionSessionWaitForAsynchronousFrames (vtdec->session); /* push a buffer if there are enough frames to guarantee that we push in PTS