[FFmpeg-devel] [PATCH] fix seek_timestamp flag

Hendrik Leppkes h.leppkes at gmail.com
Wed Feb 10 00:00:59 CET 2016


On Tue, Feb 9, 2016 at 11:56 PM, Umair Khan <omerjerk at gmail.com> wrote:
> Signed-off-by: Umair Khan <omerjerk at gmail.com>
> ---
>  ffmpeg_opt.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
> index 669976b..011a10b 100644
> --- a/ffmpeg_opt.c
> +++ b/ffmpeg_opt.c
> @@ -164,6 +164,7 @@ static void init_options(OptionsContext *o)
>      o->mux_max_delay  = 0.7;
>      o->start_time     = AV_NOPTS_VALUE;
>      o->start_time_eof = AV_NOPTS_VALUE;
> +    o->seek_timestamp = AV_NOPTS_VALUE;
>      o->recording_time = INT64_MAX;
>      o->limit_filesize = UINT64_MAX;
>      o->chapters_input_file = INT_MAX;
> @@ -984,8 +985,8 @@ static int open_input_file(OptionsContext *o, const char *filename)
>      }
>      timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time;
>      /* add the stream start time */
> -    if (!o->seek_timestamp && ic->start_time != AV_NOPTS_VALUE)
> -        timestamp += ic->start_time;
> +    if (o->seek_timestamp != AV_NOPTS_VALUE)
> +        timestamp += ic->seek_timestamp;

This seems wrong, the original codes intent was not to handle the
seek_timestamp but the start time, which you just replace?


More information about the ffmpeg-devel mailing list