mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avformat/segment: export inner muxer timebase
Fixes "Non-monotonous DTS in output stream 0:0"
Fixes Ticket4020
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ce80f9fee9
)
This commit is contained in:
parent
3e0802e42b
commit
cc9c74ea87
@ -567,6 +567,7 @@ static int seg_write_header(AVFormatContext *s)
|
|||||||
AVFormatContext *oc = NULL;
|
AVFormatContext *oc = NULL;
|
||||||
AVDictionary *options = NULL;
|
AVDictionary *options = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
int i;
|
||||||
|
|
||||||
seg->segment_count = 0;
|
seg->segment_count = 0;
|
||||||
if (!seg->write_header_trailer)
|
if (!seg->write_header_trailer)
|
||||||
@ -672,6 +673,13 @@ static int seg_write_header(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
seg->segment_frame_count = 0;
|
seg->segment_frame_count = 0;
|
||||||
|
|
||||||
|
av_assert0(s->nb_streams == oc->nb_streams);
|
||||||
|
for (i = 0; i < s->nb_streams; i++) {
|
||||||
|
AVStream *inner_st = oc->streams[i];
|
||||||
|
AVStream *outer_st = s->streams[i];
|
||||||
|
avpriv_set_pts_info(outer_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den);
|
||||||
|
}
|
||||||
|
|
||||||
if (oc->avoid_negative_ts > 0 && s->avoid_negative_ts < 0)
|
if (oc->avoid_negative_ts > 0 && s->avoid_negative_ts < 0)
|
||||||
s->avoid_negative_ts = 1;
|
s->avoid_negative_ts = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user