mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
ext/ogg/gstoggdemux.c: Fix EOS again. Needs to be done in a better way. We should not remove the pad if there is no n...
Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_demux_src_event), (gst_ogg_demux_handle_event), (_find_chain_get_unknown_part), (_find_streams_check), (gst_ogg_demux_push): Fix EOS again. Needs to be done in a better way. We should not remove the pad if there is no new chained stream.
This commit is contained in:
parent
e2dc945577
commit
a38d338dcd
2 changed files with 18 additions and 16 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-10-26 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_src_event),
|
||||
(gst_ogg_demux_handle_event), (_find_chain_get_unknown_part),
|
||||
(_find_streams_check), (gst_ogg_demux_push):
|
||||
Fix EOS again. Needs to be done in a better way. We should not
|
||||
remove the pad if there is no new chained stream.
|
||||
|
||||
2004-10-26 Iain <iaingnome@gmail.com>
|
||||
|
||||
* ext/ogg/gstoggdemux.c (gst_ogg_pad_new): Free the tag list.
|
||||
|
|
|
@ -559,12 +559,10 @@ gst_ogg_demux_src_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
GST_OGG_SET_STATE (ogg, GST_OGG_STATE_PLAY);
|
||||
FOR_PAD_IN_CURRENT_CHAIN (ogg, pad,
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_DISCONT;
|
||||
);
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_DISCONT;);
|
||||
if (GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH) {
|
||||
FOR_PAD_IN_CURRENT_CHAIN (ogg, pad,
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_FLUSH;
|
||||
);
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_FLUSH;);
|
||||
}
|
||||
GST_DEBUG_OBJECT (ogg,
|
||||
"initiating seeking to format %d, offset %" G_GUINT64_FORMAT, format,
|
||||
|
@ -638,8 +636,7 @@ gst_ogg_demux_handle_event (GstPad * pad, GstEvent * event)
|
|||
gst_event_unref (event);
|
||||
GST_FLAG_UNSET (ogg, GST_OGG_FLAG_WAIT_FOR_DISCONT);
|
||||
FOR_PAD_IN_CURRENT_CHAIN (ogg, pad,
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_DISCONT;
|
||||
);
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_DISCONT;);
|
||||
break;
|
||||
default:
|
||||
gst_pad_event_default (pad, event);
|
||||
|
@ -925,8 +922,7 @@ _find_chain_get_unknown_part (GstOggDemux * ogg, gint64 * start, gint64 * end)
|
|||
*end = G_MAXINT64;
|
||||
|
||||
g_assert (ogg->current_chain >= 0);
|
||||
FOR_PAD_IN_CURRENT_CHAIN (ogg, pad, *start = MAX (*start, pad->end_offset);
|
||||
);
|
||||
FOR_PAD_IN_CURRENT_CHAIN (ogg, pad, *start = MAX (*start, pad->end_offset););
|
||||
|
||||
if (ogg->setup_state == SETUP_FIND_LAST_CHAIN) {
|
||||
*end = gst_file_pad_get_length (ogg->sinkpad);
|
||||
|
@ -1055,8 +1051,7 @@ _find_streams_check (GstOggDemux * ogg)
|
|||
} else {
|
||||
endpos = G_MAXINT64;
|
||||
FOR_PAD_IN_CHAIN (ogg, pad, ogg->chains->len - 1,
|
||||
endpos = MIN (endpos, pad->start_offset);
|
||||
);
|
||||
endpos = MIN (endpos, pad->start_offset););
|
||||
}
|
||||
if (!ogg->seek_skipped || gst_ogg_demux_position (ogg) >= endpos) {
|
||||
/* have we found the endposition for all streams yet? */
|
||||
|
@ -1365,14 +1360,13 @@ gst_ogg_demux_push (GstOggDemux * ogg, ogg_page * page)
|
|||
if (ogg_page_eos (page)) {
|
||||
GST_DEBUG_OBJECT (ogg, "got EOS for stream with serial %d, sending EOS now",
|
||||
cur->serial);
|
||||
/* Removing pads while PLAYING doesn't work with current schedulers */
|
||||
/* remove from list, as this will never be called again */
|
||||
|
||||
/* send an EOS before removing this pad */
|
||||
if (GST_PAD_IS_USABLE (cur->pad))
|
||||
gst_pad_push (cur->pad, GST_DATA (gst_event_new (GST_EVENT_EOS)));
|
||||
|
||||
gst_element_remove_pad (GST_ELEMENT (ogg), cur->pad);
|
||||
cur->pad = NULL;
|
||||
#if 0
|
||||
/* this is also not possible because sending EOS this way confuses the scheduler */
|
||||
gst_pad_push (cur->pad, GST_DATA (gst_event_new (GST_EVENT_EOS)));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue