assertion 'gst_buffer_is_writable' in aacparse

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

assertion 'gst_buffer_is_writable' in aacparse

Gst-Geek
This post was updated on .
Hello All,

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

gst-launch-1.0 audiotestsrc name=src \
src.! voaacenc ! audio/mpeg,framed=true,stream-format=adts ! tee name=split \
split.! queue ! aacparse ! audio/mpeg,stream-format=adts ! fakesink \
split.! queue ! aacparse ! audio/mpeg,stream-format=raw ! fakesink --gst-debug=3 -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
Reply | Threaded
Open this post in threaded view
|

Re: assertion 'gst_buffer_is_writable' in aacparse

Tim Müller
On Tue, 2016-11-08 at 01:55 -0800, Vinod Kesti wrote:

Hi,

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

It sounds like the right fix (but I have not looked at the code yet).

Please raise a bug and provide a patch, yes. Thank you!

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel