[FFmpeg-devel] [RFC] Negative Bitrate Assertion Error

David Czech davidczech510
Sat Dec 18 05:59:11 CET 2010

 >> or if bitrate isn't
>> supposed to be negative, where should the bitrate value be validated?
>Thats actually not so easy to awnser
>There are many awnsers ...
>One thing you might try is to find all code that checks bitrate for 0 or
not 0
>and change that to <=0 and >0
>Iam not sure if this would fix the bug but at least it would make the code
>more robust

>Hint, you can find these quickly in
>grep -C4 'if.*bit_rate' --color libavformat/*.c

Thanks for the tip, switched some out, (patch here
<http://dpaste.com/287934/> ) and no longer crashes. What do you think?

>> By the way, I've noticed that av_rescale should call av_rescale_rnd, with
>> the exact same arguments, but it doesn't seem like that is happening (?).
>> #4  0x08446e87 in av_rescale_rnd (a=549859968, b=1200000,
>> c=-1875801792, rnd=AV_ROUND_ZERO) at libavutil/mathematics.c:79
>> #5  0x084471ef in av_rescale (a=0, b=0, c=-4294967296) at
>> libavutil/mathematics.c:130

>Try to recompile with optimizations disabled
>(theres a switch to configure or you could edit CFLAGS in config.mak)

Yes, this was built without optimizations. ( configuration:
--disable-optimizations --disable-asm (because of
https://roundup.ffmpeg.org/issue2127 ) )

(Hope I didn't break any netiquette laws, this is like my first time posting
to a mailing list)

More information about the ffmpeg-devel mailing list