Push EOS, FLUSH_STOP and NEWSEGMENT immediately instead of dropping and leaking them.

Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_sink_event):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_sink_event):
Push EOS, FLUSH_STOP and NEWSEGMENT immediately instead
of dropping and leaking them.
This commit is contained in:
Sebastian Dröge 2008-02-27 15:23:51 +00:00
parent b6529e9d60
commit 71f6199a90
3 changed files with 15 additions and 8 deletions

View file

@ -1,3 +1,11 @@
2008-02-27 Sebastian Dröge <slomo@circular-chaos.org>
* ext/mad/gstmad.c: (gst_mad_sink_event):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_sink_event):
Push EOS, FLUSH_STOP and NEWSEGMENT immediately instead
of dropping and leaking them.
2008-02-27 Sebastian Dröge <slomo@circular-chaos.org>
* ext/mad/gstmad.c: (gst_mad_dispose), (gst_mad_sink_event),

View file

@ -993,8 +993,7 @@ gst_mad_sink_event (GstPad * pad, GstEvent * event)
break;
default:
if (mad->restart) {
/* Cache all events except EOS if we still have to send a NEWSEGMENT */
if (GST_EVENT_TYPE (event) != GST_EVENT_EOS)
/* Cache all other events if we still have to send a NEWSEGMENT */
mad->pending_events = g_list_append (mad->pending_events, event);
result = TRUE;
} else {

View file

@ -541,9 +541,9 @@ gst_mp3parse_sink_event (GstPad * pad, GstEvent * event)
break;
default:
GST_PAD_STREAM_LOCK (pad);
if (mp3parse->pending_segment) {
/* Cache all events except EOS if we have a pending segment */
if (GST_EVENT_TYPE (event) != GST_EVENT_EOS)
/* Cache all events except EOS and the ones above if we have
* a pending segment */
if (mp3parse->pending_segment && GST_EVENT_TYPE (event) != GST_EVENT_EOS) {
mp3parse->pending_events =
g_list_append (mp3parse->pending_events, event);
} else {