Commit ff9e37ea authored by Thiago Santos's avatar Thiago Santos

videodecoder: return EOS when segment is over

if a buffer is clipped by being completely out of segment, check if this
buffer is after the end of the segment and return EOS upstream

https://bugzilla.gnome.org/show_bug.cgi?id=709224
parent 09b8f902
...@@ -2721,6 +2721,12 @@ gst_video_decoder_clip_and_push_buf (GstVideoDecoder * decoder, GstBuffer * buf) ...@@ -2721,6 +2721,12 @@ gst_video_decoder_clip_and_push_buf (GstVideoDecoder * decoder, GstBuffer * buf)
GST_TIME_ARGS (start), GST_TIME_ARGS (stop), GST_TIME_ARGS (start), GST_TIME_ARGS (stop),
GST_TIME_ARGS (segment->start), GST_TIME_ARGS (segment->start),
GST_TIME_ARGS (segment->stop), GST_TIME_ARGS (segment->time)); GST_TIME_ARGS (segment->stop), GST_TIME_ARGS (segment->time));
if (segment->rate >= 0) {
if (GST_BUFFER_PTS (buf) >= segment->stop)
ret = GST_FLOW_EOS;
} else if (GST_BUFFER_PTS (buf) < segment->start) {
ret = GST_FLOW_EOS;
}
gst_buffer_unref (buf); gst_buffer_unref (buf);
goto done; goto done;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment