[FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.
Lucas Cooper
bobobo at google.com
Fri Apr 21 10:01:01 EEST 2017
Does this need any more work or explanation?
On 19 Apr. 2017 7:32 am, "Lucas Cooper" <bobobo at google.com> wrote:
> Michael's right. The problem is that NaN is casted to an int, resulting in
> rate having undefined value. Not sure how I neglected to add that part.
>
> On 19 Apr. 2017 2:32 am, "Michael Niedermayer" <michael at niedermayer.cc>
> wrote:
>
>> On Wed, Apr 19, 2017 at 12:49:38AM +0200, Hendrik Leppkes wrote:
>> > On Wed, Apr 19, 2017 at 12:34 AM, Lucas Cooper
>> > <bobobo-at-google.com at ffmpeg.org> wrote:
>> > > find_fps attempts to infer framerate from AVCodec's timebase. When
>> this
>> > > results in a frame rate that isn't explicitly marked as supported in
>> > > av_timecode_check_frame_rate, find_fps returns the AVStream's
>> > > avg_frame_rate, which, per avformat.h, _may_ be set (or not).
>> > >
>> > > mov_get_mpeg2_xdcam_codec_tag, mov_get_h264_codec_tag and
>> > > find_compressor attempt to call av_q2d on the return value of
>> find_fps,
>> > > which in the above case, may result in division by zero.
>> >
>> > Floating point division by zero is not an error (as av_q2d performs),
>> > and in these cases the wrong return value is likely harmless.
>> >
>> > What is the actual error you are trying to fix?
>>
>> from looking at the code, i guess its the cast to int of a non finite
>> double
>>
>> [...]
>>
>> --
>> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>
>> The real ebay dictionary, page 2
>> "100% positive feedback" - "All either got their money back or didnt
>> complain"
>> "Best seller ever, very honest" - "Seller refunded buyer after failed
>> scam"
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>>
More information about the ffmpeg-devel
mailing list