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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1206>
This commit is contained in:
Nicolas Dufresne 2021-06-16 14:49:14 -04:00 committed by GStreamer Marge Bot
parent 0ac4fda2d6
commit be6793d0d1

View file

@ -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);