Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-28 Thread Michael Niedermayer
On Thu, Apr 27, 2017 at 03:08:29PM -0700, Lucas Cooper 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,

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-27 Thread Lucas Cooper
I realized that I missed the indentation. I've fixed it in the latest patch. On 27 April 2017 at 09:52, Lucas Cooper 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 >

[FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-27 Thread Lucas Cooper
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,

[FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-27 Thread Lucas Cooper
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,

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-27 Thread Michael Niedermayer
On Fri, Apr 21, 2017 at 12:01:01AM -0700, Lucas Cooper wrote: > Does this need any more work or explanation? The code looks duplicated twice, it should be put in a seperate function, also the indention depth of one of the added lines mismatches the existing code [...] -- Michael GnuPG

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-26 Thread Lucas Cooper
Just pinging in case this got lost somewhere. On 21 April 2017 at 00:01, Lucas Cooper wrote: > Does this need any more work or explanation? > > On 19 Apr. 2017 7:32 am, "Lucas Cooper" wrote: > >> Michael's right. The problem is that NaN is casted to an

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-21 Thread Lucas Cooper
Does this need any more work or explanation? On 19 Apr. 2017 7:32 am, "Lucas Cooper" 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,

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-19 Thread Lucas Cooper
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" wrote: > On Wed, Apr 19, 2017 at 12:49:38AM +0200, Hendrik Leppkes wrote: > >

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-19 Thread Michael Niedermayer
On Wed, Apr 19, 2017 at 12:49:38AM +0200, Hendrik Leppkes wrote: > On Wed, Apr 19, 2017 at 12:34 AM, Lucas Cooper > wrote: > > find_fps attempts to infer framerate from AVCodec's timebase. When this > > results in a frame rate that isn't explicitly marked as

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-18 Thread Hendrik Leppkes
On Wed, Apr 19, 2017 at 12:34 AM, Lucas Cooper 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 >

[FFmpeg-devel] [PATCH] avformat/movenc: Explicitly address potential division by zero.

2017-04-18 Thread Lucas Cooper
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,