From be6793d0d18b28c8ce1a165dec415ae6ec0dc7c4 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 16 Jun 2021 14:49:14 -0400 Subject: [PATCH] videodecoder: Call drain() rather then finish() on segment-done The finish() virtual function documentation state that "Sub-classes can refuse to decode new data after." Though, it is very common to issue a non-flushing seek after that event in gapless playback uses case. This fixes potential stalls with code using segment seeks, by using drain() virtual funciton instead. Part-of: --- gst-libs/gst/video/gstvideodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 5df6f9c..a18d1a0 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -1270,7 +1270,7 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder, GstFlowReturn flow_ret = GST_FLOW_OK; GST_VIDEO_DECODER_STREAM_LOCK (decoder); - flow_ret = gst_video_decoder_drain_out (decoder, TRUE); + flow_ret = gst_video_decoder_drain_out (decoder, FALSE); GST_VIDEO_DECODER_STREAM_UNLOCK (decoder); ret = (flow_ret == GST_FLOW_OK); -- 2.7.4