mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
gst/mpegaudioparse/gstmpegaudioparse.c: When the element is not driving the streaming thread it is not supposed to em...
Original commit message from CVS: * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_emit_frame): When the element is not driving the streaming thread it is not supposed to emit EOS or post SEGMENT done. It is allowed to return UNEXPECTED upstream when it detects EOS. See #491305.
This commit is contained in:
parent
5c5d85f8cc
commit
2b5d45e3f6
2 changed files with 12 additions and 14 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-10-30 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
|
* gst/mpegaudioparse/gstmpegaudioparse.c:
|
||||||
|
(gst_mp3parse_emit_frame):
|
||||||
|
When the element is not driving the streaming thread it is not supposed
|
||||||
|
to emit EOS or post SEGMENT done. It is allowed to return UNEXPECTED
|
||||||
|
upstream when it detects EOS. See #491305.
|
||||||
|
|
||||||
2007-10-13 Tim-Philipp Müller <tim at centricular dot net>
|
2007-10-13 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
Patch by: Mark Nauwelaerts <mnauw at users.sourceforge.net>
|
Patch by: Mark Nauwelaerts <mnauw at users.sourceforge.net>
|
||||||
|
|
|
@ -623,22 +623,12 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size)
|
||||||
mp3parse->pending_segment = NULL;
|
mp3parse->pending_segment = NULL;
|
||||||
ret = gst_pad_push (mp3parse->srcpad, outbuf);
|
ret = gst_pad_push (mp3parse->srcpad, outbuf);
|
||||||
}
|
}
|
||||||
if (ret == GST_FLOW_UNEXPECTED
|
|
||||||
&& mp3parse->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
|
||||||
GstClockTime stop;
|
|
||||||
|
|
||||||
GST_LOG_OBJECT (mp3parse, "Sending segment done");
|
/* return unexpected when we run off the end of the segment */
|
||||||
|
if (GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop)
|
||||||
if ((stop = mp3parse->segment.stop) == -1)
|
|
||||||
stop = mp3parse->segment.duration;
|
|
||||||
|
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (mp3parse),
|
|
||||||
gst_message_new_segment_done (GST_OBJECT_CAST (mp3parse),
|
|
||||||
mp3parse->segment.format, stop));
|
|
||||||
} else if (GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop)
|
|
||||||
&& mp3parse->next_ts >= mp3parse->segment.stop) {
|
&& mp3parse->next_ts >= mp3parse->segment.stop) {
|
||||||
GST_DEBUG_OBJECT (mp3parse, "Sending EOS");
|
GST_DEBUG_OBJECT (mp3parse, "returning unexpected");
|
||||||
gst_pad_push_event (mp3parse->srcpad, gst_event_new_eos ());
|
ret = GST_FLOW_UNEXPECTED;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue