Commit 91f5950f authored by Gyan Doshi's avatar 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.
parent 86f04b91
...@@ -181,6 +181,12 @@ static int segment_mux_init(AVFormatContext *s) ...@@ -181,6 +181,12 @@ static int segment_mux_init(AVFormatContext *s)
st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio; st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
st->time_base = s->streams[i]->time_base; st->time_base = s->streams[i]->time_base;
st->avg_frame_rate = s->streams[i]->avg_frame_rate; 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); av_dict_copy(&st->metadata, s->streams[i]->metadata, 0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment