GNOME Bugzilla – Bug 707040
Segfault in avenc_g722
Last modified: 2013-09-18 16:49:13 UTC
Created attachment 253488 [details] Mentioned code My application is built like this pipeline: filesrc | decodebin | avenc_g722 | rtpg722pay | udpsink After playing a file, it goes to GST_STATE_READY, changes location of filesrc and then plays again. The first play works fine, and but the second results in segfault. Stacktrace: Thread [5] 8758 [core: 0] (Suspended : Signal : SIGSEGV:Segmentation fault) gst_ffmpeg_audioinfo_to_context() at gstavcodecmap.c:2,507 0x7ffff3ec6d25 gst_ffmpegaudenc_set_format() at gstavaudenc.c:272 0x7ffff3ecb092 gst_audio_encoder_sink_setcaps() at gstaudioencoder.c:1,282 0x7ffff53eed8e gst_audio_encoder_chain() at gstaudioencoder.c:1,055 0x7ffff5408589 gst_pad_chain_data_unchecked() at gstpad.c:3,711 0x7ffff75f65e0 gst_pad_push_data() at gstpad.c:3,941 0x7ffff75f65e0 gst_pad_push() at gstpad.c:4,044 0x7ffff75fd0c6 gst_proxy_pad_chain_default() at gstghostpad.c:128 0x7ffff75e712b gst_pad_chain_data_unchecked() at gstpad.c:3,711 0x7ffff75f65e0 gst_pad_push_data() at gstpad.c:3,941 0x7ffff75f65e0 <...more frames...> This worked fine in 1.0.9. Code to my program is attached. To run use the following commands: setup ip port bind-port payload payload-as-string play file play file
I just tried running it with libav 1.0 branch, rest branch. It worked fine then.
Yes, from looking at the code it must crash ;)
This should fix it: commit 6571196fb87394dfbb3f090cb5442c8c30283bf0 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Thu Aug 29 16:53:28 2013 +0200 libav: avcodec_close() also resets fields like the AVCodec We need to reload the defaults for the codec after closing it, otherwise we can't access codec information like the supported sample rates and can crash. https://bugzilla.gnome.org/show_bug.cgi?id=707040