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
This commit is contained in:
Thiago Santos 2014-05-26 12:44:48 -03:00
parent 09b8f902ea
commit ff9e37ea66

View file

@ -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 (segment->start),
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);
goto done;
}