+2008-02-14 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * gst/mpegaudioparse/gstmpegaudioparse.c:
+ (gst_mp3parse_emit_frame):
+ Return GST_FLOW_UNEXPECTED if we get data that is after our
+ configured segment. This makes upstream go EOS immediately instead
+ of sending us the complete stream. Also improve debugging a bit.
+
2008-02-13 Jan Schmidt <jan.schmidt@sun.com>
* ext/dvdread/dvdreadsrc.c:
if (G_UNLIKELY ((GST_CLOCK_TIME_IS_VALID (push_start) &&
GST_BUFFER_TIMESTAMP (outbuf) + GST_BUFFER_DURATION (outbuf)
- < push_start)
- || (GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop)
- && GST_BUFFER_TIMESTAMP (outbuf) >= mp3parse->segment.stop))) {
+ < push_start))) {
GST_DEBUG_OBJECT (mp3parse,
- "Buffer outside of configured segment range %" GST_TIME_FORMAT
+ "Buffer before configured segment range %" GST_TIME_FORMAT
" to %" GST_TIME_FORMAT ", dropping, timestamp %"
- GST_TIME_FORMAT ", offset 0x%08" G_GINT64_MODIFIER "x",
- GST_TIME_ARGS (push_start), GST_TIME_ARGS (mp3parse->segment.stop),
+ GST_TIME_FORMAT " duration %" GST_TIME_FORMAT
+ ", offset 0x%08" G_GINT64_MODIFIER "x", GST_TIME_ARGS (push_start),
+ GST_TIME_ARGS (mp3parse->segment.stop),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
+ GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)),
GST_BUFFER_OFFSET (outbuf));
gst_buffer_unref (outbuf);
ret = GST_FLOW_OK;
+ } else if (G_UNLIKELY (GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop)
+ && GST_BUFFER_TIMESTAMP (outbuf) >= mp3parse->segment.stop)) {
+ GST_DEBUG_OBJECT (mp3parse,
+ "Buffer after configured segment range %" GST_TIME_FORMAT
+ " to %" GST_TIME_FORMAT ", returning GST_FLOW_UNEXPECTED, timestamp %"
+ GST_TIME_FORMAT " duration %" GST_TIME_FORMAT ", offset 0x%08"
+ G_GINT64_MODIFIER "x", GST_TIME_ARGS (push_start),
+ GST_TIME_ARGS (mp3parse->segment.stop),
+ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
+ GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)),
+ GST_BUFFER_OFFSET (outbuf));
+ gst_buffer_unref (outbuf);
+ ret = GST_FLOW_UNEXPECTED;
} else {
GST_DEBUG_OBJECT (mp3parse,
"pushing buffer of %d bytes, timestamp %" GST_TIME_FORMAT