summaryrefslogtreecommitdiff
path: root/gst/nuvdemux
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-09-24 10:53:37 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-09-24 10:53:37 +0000
commit1af510f8d54ddeb58f1c8e6db3f4fe45d21dd026 (patch)
tree5562881810015d176f8ed198f09a9f1f2dc8e602 /gst/nuvdemux
parent9525b8056fb7dbd279b4622c56e84beca56c0ad4 (diff)
Massive leak fixing, plus code cleanups.
Original commit message from CVS: * ext/audioresample/gstaudioresample.c: * ext/x264/gstx264enc.c: * gst/dvdspu/gstdvdspu.c: * gst/dvdspu/gstdvdspu.h: * gst/festival/gstfestival.c: * gst/h264parse/gsth264parse.c: * gst/mpegtsparse/mpegtspacketizer.c: * gst/mpegtsparse/mpegtsparse.c: * gst/multifile/gstmultifilesink.c: * gst/multifile/gstmultifilesrc.c: * gst/nuvdemux/gstnuvdemux.c: * sys/dshowsrcwrapper/gstdshowaudiosrc.c: * sys/dshowsrcwrapper/gstdshowvideosrc.c: * sys/vcd/vcdsrc.c: Massive leak fixing, plus code cleanups.
Diffstat (limited to 'gst/nuvdemux')
-rw-r--r--gst/nuvdemux/gstnuvdemux.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c
index 219a580a0..20ba7538a 100644
--- a/gst/nuvdemux/gstnuvdemux.c
+++ b/gst/nuvdemux/gstnuvdemux.c
@@ -802,11 +802,16 @@ gst_nuv_demux_sink_activate (GstPad * sinkpad)
if (gst_pad_check_pull_range (sinkpad)) {
nuv->mode = 0;
- nuv->adapter = NULL;
+ if (nuv->adapter != NULL) {
+ gst_object_unref (nuv->adapter);
+ nuv->adapter = NULL;
+ }
res = gst_pad_activate_pull (sinkpad, TRUE);
} else {
nuv->mode = 1;
- nuv->adapter = gst_adapter_new ();
+ if (!nuv->adapter) {
+ nuv->adapter = gst_adapter_new ();
+ }
res = gst_pad_activate_push (sinkpad, TRUE);
}