[FFmpeg-devel] [PATCH] check for mod by zero (issue 2502)

Justin Ruggles justin.ruggles
Fri Jan 7 17:00:32 CET 2011

On 01/07/2011 09:52 AM, Daniel Kang wrote:

> On Fri, Jan 7, 2011 at 9:24 AM, Michael Niedermayer <michaelni at gmx.at>wrote:
>>  On Thu, Jan 06, 2011 at 10:13:51PM -0500, Daniel Kang wrote:
>>> I have tried adding this check, but it seems the values change between
>>> pcm_decode_init and pcm_decode_frame. I am unsure why.
>> codec_id changes ?
>> what is it before and what afterwards?
> The codec_id does not change. The
> av_get_bits_per_sample(avctx->codec_id) does change though, from the
> init to the decode.

it seems the codec_id does change.

voc_get_packet() changes the codec_id based on packet data.  So I think
a fix needs to go there.

but maybe pcm.c also needs a check for sample_size != 0 before
n = avctx->channels * sample_size.


More information about the ffmpeg-devel mailing list