From a739f67bc2397163d05c80aec1fcb1099fc370cd Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sun, 17 Feb 2008 18:49:30 +0000 Subject: [PATCH] gst/mpegaudioparse/gstmpegaudioparse.c: Revert previous commit to mp3parse, as it breaks playback of AVI files. Original commit message from CVS: * gst/mpegaudioparse/gstmpegaudioparse.c: Revert previous commit to mp3parse, as it breaks playback of AVI files. --- ChangeLog | 7 +++++++ gst/mpegaudioparse/gstmpegaudioparse.c | 25 ++++++------------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c2368cf5a..f670dc95ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-17 Jan Schmidt + + * gst/mpegaudioparse/gstmpegaudioparse.c: + + Revert previous commit to mp3parse, as it breaks playback + of AVI files. + 2008-02-14 Sebastian Dröge * gst/mpegaudioparse/gstmpegaudioparse.c: diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index 190ba3afeb..a61c08f50a 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -624,31 +624,18 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size) if (G_UNLIKELY ((GST_CLOCK_TIME_IS_VALID (push_start) && GST_BUFFER_TIMESTAMP (outbuf) + GST_BUFFER_DURATION (outbuf) - < push_start))) { + < push_start) + || (GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop) + && GST_BUFFER_TIMESTAMP (outbuf) >= mp3parse->segment.stop))) { GST_DEBUG_OBJECT (mp3parse, - "Buffer before configured segment range %" GST_TIME_FORMAT + "Buffer outside of configured segment range %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT ", dropping, 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_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