hlsdemux: don't leak the first buffer

This commit is contained in:
Andoni Morales Alastruey 2011-02-16 01:19:45 +01:00 committed by Sebastian Dröge
parent ec1d03e1b4
commit c580ff26a4

View 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);