[FFmpeg-soc] [soc]: r4540 - seek_api/mpeg.c

Baptiste Coudurier baptiste.coudurier at gmail.com
Sun Jun 28 23:20:33 CEST 2009


spyfeng wrote:
> Author: spyfeng
> Date: Sun Jun 28 05:37:40 2009
> New Revision: 4540
> 
> Log:
> check the returned pts value with given range.
> 
> Modified:
>    seek_api/mpeg.c
> 
> Modified: seek_api/mpeg.c
> ==============================================================================
> --- seek_api/mpeg.c	Sun Jun 28 04:13:13 2009	(r4539)
> +++ seek_api/mpeg.c	Sun Jun 28 05:37:40 2009	(r4540)
> @@ -706,7 +706,12 @@ static int mpegps_read_seek(struct AVFor
>      }
>  success:
>      av_update_cur_dts(s, st, pts);
> -    return 0;
> +    if (pts <= max_ts && pts >= min_ts)
> +        return 0;
> +    else {
> +        av_log(s, AV_LOG_ERROR,"The target pts = %"PRId64" is out of range. min_ts = %"PRId64", max_ts = %"PRId64"\n", pts, min_ts, max_ts);
> +        return -1;
> +    }
>  }

I don't think av_update_cur_dts must be done if seek has failed.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org


More information about the FFmpeg-soc mailing list