assertion 'gst_buffer_is_writable' in aacparse

Vinod Kesti vinodkesti at yahoo.com
Tue Nov 8 09:55:22 UTC 2016


Hello All,

When accparse is using read only input buffer. Assertion is dumped. 

gst-launch-1.0 audiotestsrc ! rsenc_aac ! tee name=split split.! queue !
aacparse ! audio/mpeg,framed=true,mpegversion=4,stream-format=adts !
mpegtsmux ! fakesink split.! queue ! aacparse ! flvmux ! fakesink -v

GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed
GStreamer-CRITICAL **: gst_buffer_resize_range: assertion
'gst_buffer_is_writable (buffer)' failed

 Note: mpegts muxer negotiated to raw aac format but I have forced to adts
just to reproduce the issue. 

On digging into the code found the aacprase is trying to resize the buffer
without checking write permission.
Issue is resolved by changing buffer permission using
gst_buffer_make_writable Function.

  /* As a special case, we can remove the ADTS framing and output raw AAC.
*/
  if (aacparse->header_type == DSPAAC_HEADER_ADTS
      && aacparse->output_header_type == DSPAAC_HEADER_NONE) {
    guint header_size;
    GstMapInfo map;
    frame->buffer = gst_buffer_make_writable( frame->buffer); 
    ...
    ...
  }

Is this clean fix ??
Shall I raise bug and provide patch for this ??
Gstreamer 1.10 was used to for testing..


~ Vinod



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/assertion-gst-buffer-is-writable-in-aacparse-tp4680536.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list