mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
ext/ogg/: Fix memleak in oggdemux when running unconnected pads. doc update in mux, start working on keyframe mode.
Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_pad_push): * ext/ogg/gstoggmux.c: Fix memleak in oggdemux when running unconnected pads. doc update in mux, start working on keyframe mode.
This commit is contained in:
parent
823eddd738
commit
2917844f09
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-06-29 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_push):
|
||||
* ext/ogg/gstoggmux.c:
|
||||
Fix memleak in oggdemux when running unconnected pads.
|
||||
doc update in mux, start working on keyframe mode.
|
||||
|
||||
2004-06-29 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* sys/oss/gstosssink.c:
|
||||
|
|
|
@ -376,8 +376,7 @@ gst_ogg_demux_src_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
GST_OGG_SET_STATE (ogg, GST_OGG_STATE_SEEK);
|
||||
FOR_PAD_IN_CURRENT_CHAIN (ogg, pad,
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_DISCONT;
|
||||
);
|
||||
pad->flags |= GST_OGG_PAD_NEEDS_DISCONT;);
|
||||
GST_DEBUG_OBJECT (ogg, "initiating seeking to offset %" G_GUINT64_FORMAT,
|
||||
offset);
|
||||
ogg->seek_pad = cur;
|
||||
|
@ -424,8 +423,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;
|
||||
case GST_EVENT_EOS:
|
||||
if (ogg->state == GST_OGG_STATE_SETUP) {
|
||||
|
@ -829,6 +827,8 @@ gst_ogg_pad_push (GstOggDemux * ogg, GstOggPad * pad)
|
|||
pad->offset = packet.granulepos;
|
||||
if (GST_PAD_IS_USABLE (pad->pad))
|
||||
gst_pad_push (pad->pad, GST_DATA (buf));
|
||||
else
|
||||
gst_buffer_unref (buf);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -92,6 +92,10 @@ struct _GstOggMux
|
|||
|
||||
guint64 max_delay;
|
||||
guint64 max_page_delay;
|
||||
|
||||
gboolean keyframe_mode; /* when a delta frame is detected on a stream, we mark
|
||||
pages as delta frames up to the page that has the
|
||||
keyframe */
|
||||
};
|
||||
|
||||
typedef enum
|
||||
|
@ -804,11 +808,14 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
|
|||
* 1) find a pad to pull on, this is done by pulling on all pads and
|
||||
* looking at the buffers to decide which one should be muxed first.
|
||||
* 2) store the selected pad and keep on pulling until we fill a
|
||||
* complete ogg page. This is needed because the ogg spec says that
|
||||
* complete ogg page or the ogg page is filled above the max-delay
|
||||
* threshold. This is needed because the ogg spec says that
|
||||
* you should fill a complete page with data from the same logical
|
||||
* stream. When the page is filled, go back to 1).
|
||||
* 3) before filling a packet, read ahead one more buffer to see if this
|
||||
* packet is the last of the stream.
|
||||
* packet is the last of the stream. We need to do this because the ogg
|
||||
* spec mandates that the last packet should have the EOS flag set before
|
||||
* sending it to ogg.
|
||||
*/
|
||||
static void
|
||||
gst_ogg_mux_loop (GstElement * element)
|
||||
|
|
Loading…
Reference in a new issue