On Wed, Jan 27, 2016 at 09:13:19PM +0000, Derek Buitenhuis wrote: > It could accidentally divide by zero if num was zero. > > Signed-off-by: Derek Buitenhuis <derek.buitenh...@gmail.com> > --- > libavcodec/utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/utils.c b/libavcodec/utils.c > index 13ee243..491d8ea 100644 > --- a/libavcodec/utils.c > +++ b/libavcodec/utils.c > @@ -1475,7 +1475,7 @@ FF_ENABLE_DEPRECATION_WARNINGS > if (!avctx->rc_initial_buffer_occupancy) > avctx->rc_initial_buffer_occupancy = avctx->rc_buffer_size * 3 / > 4; > > - if (avctx->ticks_per_frame && > + if (avctx->ticks_per_frame && avctx->time_base.num &&
is the avctx->ticks_per_frame != 0 check needed? LGTM with or without the ticks_per_frame check -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel