hlsdemux: don't leak the first buffer
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Wed, 16 Feb 2011 00:19:45 +0000 (01:19 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 30 Mar 2011 07:19:22 +0000 (09:19 +0200)
gst/hls/gsthlsdemux.c

index d31bf197af57ed2963b06d207172d7a04b8e4ce3..1fe68cae4b8dd813888a9f0943e2e2c8d31fb8e7 100644 (file)
@@ -378,12 +378,10 @@ gst_hls_demux_chain (GstPad * pad, GstBuffer * buf)
 {
   GstHLSDemux *demux = GST_HLS_DEMUX (gst_pad_get_parent (pad));
 
-  if (demux->playlist == NULL) {
-    gst_buffer_ref (buf);
+  if (demux->playlist == NULL)
     demux->playlist = buf;
-  } else {
+  else
     demux->playlist = gst_buffer_join (demux->playlist, buf);
-  }
 
   gst_object_unref (demux);