[FFmpeg-devel] [PATCH 3/3] Only set starttime to pts when pts and dts agree

Måns Rullgård mans
Wed Mar 2 18:32:57 CET 2011


Benjamin Larsson <benjamin at southpole.se> writes:

> ---
>  libavformat/utils.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index c8e16ba..7627364 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -872,7 +872,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
>              st->start_time= pktl->pkt.pts;
>      }
>      if (st->start_time == AV_NOPTS_VALUE)
> -        st->start_time = pts;
> +        st->start_time = pts==dts ? pts : AV_NOPTS_VALUE;
>  }
>  
>  static void update_initial_durations(AVFormatContext *s, AVStream *st, AVPacket *pkt)
> -- 
> 1.7.1

What is this intended to fix?  Why should this be done only if pts and
dts are equal, i.e. no decoder delay?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list