mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst/mpegaudioparse/gstmpegaudioparse.c: Return GST_FLOW_UNEXPECTED if we get data that is after our configured segmen...
Original commit message from CVS: * 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.
This commit is contained in:
parent
79f25f10db
commit
451f53d7de
2 changed files with 27 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2008-02-13 Jan Schmidt <jan.schmidt@sun.com>
|
||||||
|
|
||||||
* ext/dvdread/dvdreadsrc.c:
|
* ext/dvdread/dvdreadsrc.c:
|
||||||
|
|
|
@ -624,18 +624,31 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size)
|
||||||
|
|
||||||
if (G_UNLIKELY ((GST_CLOCK_TIME_IS_VALID (push_start) &&
|
if (G_UNLIKELY ((GST_CLOCK_TIME_IS_VALID (push_start) &&
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) + GST_BUFFER_DURATION (outbuf)
|
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,
|
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 %"
|
" to %" GST_TIME_FORMAT ", dropping, timestamp %"
|
||||||
GST_TIME_FORMAT ", offset 0x%08" G_GINT64_MODIFIER "x",
|
GST_TIME_FORMAT " duration %" GST_TIME_FORMAT
|
||||||
GST_TIME_ARGS (push_start), GST_TIME_ARGS (mp3parse->segment.stop),
|
", 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_TIMESTAMP (outbuf)),
|
||||||
|
GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)),
|
||||||
GST_BUFFER_OFFSET (outbuf));
|
GST_BUFFER_OFFSET (outbuf));
|
||||||
gst_buffer_unref (outbuf);
|
gst_buffer_unref (outbuf);
|
||||||
ret = GST_FLOW_OK;
|
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 {
|
} else {
|
||||||
GST_DEBUG_OBJECT (mp3parse,
|
GST_DEBUG_OBJECT (mp3parse,
|
||||||
"pushing buffer of %d bytes, timestamp %" GST_TIME_FORMAT
|
"pushing buffer of %d bytes, timestamp %" GST_TIME_FORMAT
|
||||||
|
|
Loading…
Reference in a new issue