summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-05-06 13:15:30 +0200
committerEdward Hervey <bilboed@bilboed.com>2009-05-06 13:15:30 +0200
commitc1953235faaa457a14b20722e54e2af22e58f328 (patch)
tree0a039225a9c0f9dc7da49127aa6659abf2f8a3c6
parent21d2fffb13cdddea4f6a60e0606657e93a48802b (diff)
mpegaudioparse: Remove useless checks for valid buffer duration.
The buffer duration is set to a valid value at the very top of emit_frame(), we therefore don't need to check it later on.
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index 06e6b9d9..7ed4649d 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -684,8 +684,7 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size,
}
mp3parse->tracked_offset += size;
- if (GST_BUFFER_TIMESTAMP_IS_VALID (outbuf)
- && GST_BUFFER_DURATION_IS_VALID (outbuf))
+ if (GST_BUFFER_TIMESTAMP_IS_VALID (outbuf))
mp3parse->next_ts =
GST_BUFFER_TIMESTAMP (outbuf) + GST_BUFFER_DURATION (outbuf);
@@ -775,7 +774,6 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size,
if (G_UNLIKELY ((GST_CLOCK_TIME_IS_VALID (push_start) &&
GST_BUFFER_TIMESTAMP_IS_VALID (outbuf) &&
- GST_BUFFER_DURATION_IS_VALID (outbuf) &&
GST_BUFFER_TIMESTAMP (outbuf) + GST_BUFFER_DURATION (outbuf)
< push_start))) {
GST_DEBUG_OBJECT (mp3parse,
@@ -792,12 +790,12 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size,
ret = GST_FLOW_OK;
} else if (G_UNLIKELY (GST_BUFFER_TIMESTAMP_IS_VALID (outbuf) &&
GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop) &&
- GST_BUFFER_DURATION_IS_VALID (outbuf) &&
GST_BUFFER_TIMESTAMP (outbuf) >=
mp3parse->segment.stop + GST_BUFFER_DURATION (outbuf))) {
/* Some mp3 streams have an offset in the timestamps, for which we have to
* push the frame *after* the end position in order for the decoder to be
- * able to decode everything up until the segment.stop position */
+ * able to decode everything up until the segment.stop position.
+ * That is the reason of the calculated offset */
GST_DEBUG_OBJECT (mp3parse,
"Buffer after configured segment range %" GST_TIME_FORMAT " to %"
GST_TIME_FORMAT ", returning GST_FLOW_UNEXPECTED, timestamp %"