videosegmentclip: Don't leak buffers after segment

This commit is contained in:
David Schleef 2013-03-01 16:52:41 -08:00
parent aa8918411e
commit a80726c8d7

View file

@ -143,6 +143,7 @@ gst_video_segment_clip_clip_buffer (GstSegmentClip * base, GstBuffer * buffer,
} else {
GST_DEBUG_OBJECT (self, "Buffer outside the configured segment");
gst_buffer_unref (buffer);
if (segment->rate >= 0) {
if (segment->stop != -1 && timestamp >= segment->stop)
return GST_FLOW_EOS;
@ -150,7 +151,6 @@ gst_video_segment_clip_clip_buffer (GstSegmentClip * base, GstBuffer * buffer,
if (segment->start != -1 && timestamp + duration <= segment->start)
return GST_FLOW_EOS;
}
gst_buffer_unref (buffer);
}