Skip to content

Commit

Permalink
videodecoder: Call drain() rather then finish() on segment-done
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ndufresne authored and GStreamer Marge Bot committed Jun 23, 2021
1 parent 0ac4fda commit be6793d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gst-libs/gst/video/gstvideodecoder.c
Expand Up @@ -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);

Expand Down

0 comments on commit be6793d

Please sign in to comment.