mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
gst/avi/gstavidemux.c: Plug a little leak. Little code cleanups.
Original commit message from CVS: * gst/avi/gstavidemux.c: Plug a little leak. Little code cleanups.
This commit is contained in:
parent
d1187f7120
commit
2d15f70302
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-09-10 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/avi/gstavidemux.c:
|
||||
Plug a little leak. Little code cleanups.
|
||||
|
||||
2007-09-09 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -191,8 +191,8 @@ gst_avi_demux_init (GstAviDemux * avi)
|
|||
gst_pad_set_activatepull_function (avi->sinkpad,
|
||||
gst_avi_demux_sink_activate_pull);
|
||||
gst_pad_set_activatepush_function (avi->sinkpad, gst_avi_demux_activate_push);
|
||||
gst_element_add_pad (GST_ELEMENT (avi), avi->sinkpad);
|
||||
gst_pad_set_chain_function (avi->sinkpad, gst_avi_demux_chain);
|
||||
gst_element_add_pad (GST_ELEMENT (avi), avi->sinkpad);
|
||||
|
||||
avi->adapter = gst_adapter_new ();
|
||||
|
||||
|
@ -216,6 +216,8 @@ gst_avi_demux_reset (GstAviDemux * avi)
|
|||
{
|
||||
gint i;
|
||||
|
||||
GST_DEBUG ("AVI: reset");
|
||||
|
||||
for (i = 0; i < avi->num_streams; i++) {
|
||||
g_free (avi->stream[i].strh);
|
||||
g_free (avi->stream[i].strf.data);
|
||||
|
@ -252,9 +254,10 @@ gst_avi_demux_reset (GstAviDemux * avi)
|
|||
g_free (avi->avih);
|
||||
avi->avih = NULL;
|
||||
|
||||
if (avi->seek_event)
|
||||
if (avi->seek_event) {
|
||||
gst_event_unref (avi->seek_event);
|
||||
avi->seek_event = NULL;
|
||||
avi->seek_event = NULL;
|
||||
}
|
||||
|
||||
if (avi->globaltags)
|
||||
gst_tag_list_free (avi->globaltags);
|
||||
|
@ -1733,6 +1736,7 @@ gst_avi_demux_stream_index (GstAviDemux * avi,
|
|||
GST_WARNING_OBJECT (avi, "skip LIST chunk, size %d",
|
||||
(8 + ((size + 1) & ~1)));
|
||||
offset += 8 + ((size + 1) & ~1);
|
||||
gst_buffer_unref (buf);
|
||||
res = gst_pad_pull_range (avi->sinkpad, offset, 8, &buf);
|
||||
if (res != GST_FLOW_OK)
|
||||
goto pull_failed;
|
||||
|
@ -2507,8 +2511,7 @@ gst_avi_demux_push_event (GstAviDemux * avi, GstEvent * event)
|
|||
avi_stream_context *stream = &avi->stream[i];
|
||||
|
||||
if (stream->pad) {
|
||||
gst_event_ref (event);
|
||||
if (gst_pad_push_event (stream->pad, event))
|
||||
if (gst_pad_push_event (stream->pad, gst_event_ref (event)))
|
||||
result = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue