[libav-api] Segfault using avcodec_decode_audio3 in multithreaded app

Ibrahim Sha'ath ibrahimshaath at gmail.com
Mon Feb 13 17:14:22 CET 2012

>>> > [wmav2 @ 0x106829e20] prev_block_len_bits N out of range
>>> > (where N is in the range 4..6).
>>> Do these errors occur when you're decoding only a single file, without
>>> threading?
>> Yes they do, and on both platforms, though I've never seen them cause
>> a segfault when not parallelised. Also interspersed with those errors
>> are
>> [wmav2 @ 0x1030a9800] overflow in spectral RLE, ignoring
>> [wmav2 @ 0x1030a9800] frame_len overflow
>> And very occasionally
>> [wmav2 @ 0x1030a9800] len -211 invalid
>> Do these errors suggest anything in particular to you?
> Yes, is it possible you're not setting AVCodecContext->bit_rate,
> ->block_align, ->extradata or ->extradata_size?

I had thought (based on what I'd read in the ffmpeg doxygen) that all
of those fields (certainly bit_rate, extra_data and extradata_size)
were set internally by libav for decoding, and only needed to be set
by the user for encoding?

If I'm wrong, could you suggest what I should set them to, for a
general decoding solution? I'm seeing no examples online that set


More information about the libav-api mailing list