Search code examples
gstreamercodecsegmentation-faultlibavgstreamer-1.0

Cannot encode G722 with avenc_g722 for Gstreamer application: Caught SIGSEGV


I would like to stream audio in G722 codec with gstreamer-1.0. When I use following commands, SIGSEGV has occured.

tx: gst-launch-1.0 -v alsasrc device="hw:0" ! decodebin ! audioconvert ! audioresample ! avenc_g722 ! fakesink

results:

/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003"

Caught SIGSEGV

#0 0x76d28c20 in poll () from /lib/libc.so.6

#1 0x00000000 in ?? () 0:00:02.291262125 957 0x1122d50 WARN
alsa gstalsasrc.c:868:xrun_recovery: xrun recovery -32: Broken pipe Spinning. Please run 'gdb gst-launch-1.0 957' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

I checked gdb, but the result is as follows.

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. 0x76c9bc20 in poll () from /lib/libc.so.6

What can I do to solve this? Is avenc_g722 has a bug?

Are there any g722 encoder? I only know ffenc_g722 but I think gst-ffmpeg is only for gstreamer-0.10, so I cannot use it.

Environment:

OS: yocto Morty CPU: imx6ull (16bit)


Solution

  • try adding audioparse something like below:

    gst-launch-1.0 -v alsasrc device="hw:0" ! audioparse ! decodebin ! audioconvert ! audioresample ! avenc_g722 ! fakesink dump=true