mpegdemux: do not use the pad buffer allocation functions in demuxers
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 24 Dec 2010 09:50:00 +0000 (09:50 +0000)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 24 Dec 2010 13:17:51 +0000 (14:17 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=637931

gst/mpegdemux/gstmpegtsdemux.c

index 8635470..166a246 100644 (file)
@@ -1616,11 +1616,9 @@ gst_mpegts_stream_parse_private_section (GstMpegTSStream * stream,
       goto wrong_crc;
 
   /* just dump this down the pad */
-  if (gst_pad_alloc_buffer (stream->pad, 0, datalen, NULL, &buffer) ==
-      GST_FLOW_OK) {
-    memcpy (buffer->data, data, datalen);
-    gst_pad_push (stream->pad, buffer);
-  }
+  buffer = gst_buffer_new_and_alloc (datalen);
+  memcpy (buffer->data, data, datalen);
+  gst_pad_push (stream->pad, buffer);
 
   GST_DEBUG_OBJECT (demux, "parsing private section");
   return TRUE;