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

Baptiste Coudurier baptiste.coudurier
Thu Mar 3 09:49:39 CET 2011


Hi Ben,

On 3/2/11 9:28 AM, Benjamin Larsson wrote:
> ---
>  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)

See thread "fix start time with delay"
Michael commented on it.

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



More information about the ffmpeg-devel mailing list