From: Wim Taymans Date: Thu, 31 Mar 2011 15:47:43 +0000 (+0200) Subject: bufferlist: fixes for new API X-Git-Tag: 1.19.3~507^2~15065 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3da9ca972a9c60f73be26f79763e5bc7c96aa96;p=platform%2Fupstream%2Fgstreamer.git bufferlist: fixes for new API --- diff --git a/gst/gdp/gstgdppay.c b/gst/gdp/gstgdppay.c index b0e3fc81f5..994f56fff9 100644 --- a/gst/gdp/gstgdppay.c +++ b/gst/gdp/gstgdppay.c @@ -300,8 +300,10 @@ gst_gdp_buffer_from_event (GstGDPPay * this, GstEvent * event) payloadbuf = gst_buffer_new (); plen = gst_dp_header_payload_length (header); - gst_buffer_take_memory (payloadbuf, - gst_memory_new_wrapped (0, payload, g_free, plen, 0, plen)); + if (plen && payload != NULL) { + gst_buffer_take_memory (payloadbuf, + gst_memory_new_wrapped (0, payload, g_free, plen, 0, plen)); + } return gst_buffer_join (headerbuf, payloadbuf);