[FFmpeg-devel] [PATCH] avformat/concat: Fix wrong wrapped timestamp

Michael Niedermayer michael at niedermayer.cc
Thu Dec 14 18:04:30 EET 2017


On Thu, Dec 14, 2017 at 03:00:50AM -0500, mymoeyard at gmail.com wrote:
> From: wu zhiqiang <mymoeyard at gmail.com>
> 
> When using concat protocal, start from middle of file will generate non-zero wrap reference. If seek to time less than the wrap reference, wrap control will be triggered and generate wrong wrapped timestamp.
> Copy wrap related stream properties when reading header can fix this problem.
> 
> Signed-off-by: wu zhiqiang <mymoeyard at gmail.com>
> ---
>  libavformat/concatdec.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
> index 0e189012ad..e933888661 100644
> --- a/libavformat/concatdec.c
> +++ b/libavformat/concatdec.c
> @@ -188,6 +188,11 @@ static int copy_stream_props(AVStream *st, AVStream *source_st)
>      st->time_base           = source_st->time_base;
>      st->sample_aspect_ratio = source_st->sample_aspect_ratio;
>  
> +    /* Fix wrap control problem */
> +    st->pts_wrap_bits       = source_st->pts_wrap_bits;
> +    st->pts_wrap_behavior   = source_st->pts_wrap_behavior;
> +    st->pts_wrap_reference  = source_st->pts_wrap_reference;

why does this not use avpriv_set_pts_info() ?


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171214/230ccb32/attachment.sig>


More information about the ffmpeg-devel mailing list