[FFmpeg-cvslog] avformat/segment: fix muxing tmcd tracks in MOV

Gyan Doshi git at videolan.org
Thu Jun 20 15:34:19 EEST 2019


ffmpeg | branch: master | Gyan Doshi <ffmpeg at gyani.pro> | Tue Jun 18 19:40:16 2019 +0530| [91f5950f833fd48f12de769374129334f8c6b237] | committer: Gyan Doshi

avformat/segment: fix muxing tmcd tracks in MOV

avformat/movenc still relies on AVCodecContext time_base to mux tmcd
tracks and segment muxer did not copy that field to inner streams
leading to SIGFPE in the child muxer instance.

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

 libavformat/segment.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 99f048aa39..e3082063d8 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -181,6 +181,12 @@ static int segment_mux_init(AVFormatContext *s)
         st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
         st->time_base = s->streams[i]->time_base;
         st->avg_frame_rate = s->streams[i]->avg_frame_rate;
+#if FF_API_LAVF_AVCTX
+FF_DISABLE_DEPRECATION_WARNINGS
+        if (s->streams[i]->codecpar->codec_tag == MKTAG('t','m','c','d'))
+            st->codec->time_base = s->streams[i]->codec->time_base;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
         av_dict_copy(&st->metadata, s->streams[i]->metadata, 0);
     }
 



More information about the ffmpeg-cvslog mailing list