[Libav-user] segfault at avcodec_encode_audio2 when

Yuri Oleynikov (יורי אולייניקוב yurkao at gmail.com
Tue Feb 11 14:38:41 CET 2014


Hello, may be this mailing list is not a "destination" for my question, but
i'll try.

i have troubles re-encoding audio file (with re-sampling) with ffmpeg libs
on windows. my application takes MP3 file and converts it to WAV+PCM.
Everything goes fine when re-encoding input file once. but if i re-encode the
file in infinite loop - it somewhen crashes on avcodec_encode_audio2.
this occurs with every PCM encoder, but never with libmp3lame.

May be this is a windows build problem - i do not known, because:
 * my Linux application passed more than 10K loops with the same MP3 file
and nothing crashed.
 * on windows, PCM's AVCodec.supported_samplerates and
AVCodec.channel_layouts is always NULL (though i've called
avcodec_register_all earlier). Nevertheless, i set them to decoder's values
and (again) everything goes fine until some loop iteration.


Thanks

input file info:
 format mp3
 codec mp3
 sample_rate 22050
 sample format AV_SAMPLE_FMT_S16P


output file info:
 format wav
 codec pcm_s32_le
 sample_rate 22050
 sample format AV_SAMPLE_FMT_S16

Windows FFmpeg libs build info:
ffmpeg version N-60487-g5129006 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Feb  9 2014 22:01:12 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth
  --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enable-iconv
  --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm
  --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb
  --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp
  --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora
  --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc
--enable-libvo-amrwbenc
  --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264
--enable-libxavs
  --enable-libxvid --enable-zlib
  libavutil      52. 63.101 / 52. 63.101
  libavcodec     55. 50.100 / 55. 50.100
  libavformat    55. 31.100 / 55. 31.100
  libavdevice    55.  8.100 / 55.  8.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100

Linux FFMpeg build info:
ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  9 2014 03:05:55 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --disable-doc --enable-shared --disable-network
--enable-gpl --enable-nonfree --enable-libmp3lame --enable-libx264
--enable-libvorbis --enable-libtheora --enable-libspeex --enable-libvpx
--enable-libfaac --enable-libopenjpeg --disable-ffserver --enable-postproc
--disable-w32threads --disable-os2threads --disable-indevs
--disable-outdevs --disable-avdevice --disable-x11grab --enable-pic
--enable-zlib --enable-bzlib --enable-shared --enable-avresample
--enable-swscale --enable-swresample --enable-postproc --enable-avfilter
--enable-avformat --enable-avcodec --enable-avutil --disable-protocols
--enable-protocol=pipe --enable-protocol=file --valgrind=/usr/bin/valgrind
--enable-ftrapv --disable-stripping --disable-optimizations
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140211/2b35efca/attachment.html>


More information about the Libav-user mailing list