[FFmpeg-devel] [PATCH] movie video source

Stefano Sabatini stefano.sabatini-lala
Sun Jan 30 18:19:42 CET 2011


On date Sunday 2011-01-30 16:15:10 +0100, Michael Niedermayer encoded:
> On Sun, Jan 30, 2011 at 12:32:25AM +0100, Stefano Sabatini wrote:
> [...]
> > +    if (movie->seek_point_d > (INT64_MAX-0.5) / 1000000) {
> > +        av_log(ctx, AV_LOG_ERROR, "Value for seek point is too big\n");
> > +        return AVERROR(EINVAL);
> > +    }
> 
> i think you can set the max in the AVOptions table correctly

Added, I'm using (INT64_MAX-1) / 1000000 for preventing rounding
errors.

Also added one more check on the seeking value for preventing overflow
when doing movie->seek_point + start_time.

> except that lgtm if tested
-- 
FFmpeg = Fast and Fiendish Magic Proud Erratic Ghost



More information about the ffmpeg-devel mailing list