[FFmpeg-cvslog] lavf/concatdec: properly init streams timestamp parameters.

Nicolas George git at videolan.org
Sun Dec 31 12:09:57 EET 2017


ffmpeg | branch: master | Nicolas George <george at nsup.org> | Sat Dec 30 12:17:08 2017 +0100| [e45f7bca735ff7ba965ec1e441199dc7aeb0c8fc] | committer: Nicolas George

lavf/concatdec: properly init streams timestamp parameters.

pts_wrap_bits defaults to 33 (like MPEG), that causes valid
timestamps to be unwrapped and become invalid.
Inspired by a patch by Wu Zhiqiang <mymoeyard at gmail.com>.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e45f7bca735ff7ba965ec1e441199dc7aeb0c8fc
---

 libavformat/concatdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index 0e189012ad..bd5174ada2 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -185,8 +185,8 @@ static int copy_stream_props(AVStream *st, AVStream *source_st)
         return ret;
     st->r_frame_rate        = source_st->r_frame_rate;
     st->avg_frame_rate      = source_st->avg_frame_rate;
-    st->time_base           = source_st->time_base;
     st->sample_aspect_ratio = source_st->sample_aspect_ratio;
+    avpriv_set_pts_info(st, 64, source_st->time_base.num, source_st->time_base.den);
 
     av_dict_copy(&st->metadata, source_st->metadata, 0);
     return 0;



More information about the ffmpeg-cvslog mailing list