Browse Source

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>
tags/n2.5
Michael Niedermayer 11 years ago
parent
commit
ce80f9fee9
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      libavformat/segment.c

+ 8
- 0
libavformat/segment.c View File

@@ -570,6 +570,7 @@ static int seg_write_header(AVFormatContext *s)
AVFormatContext *oc = NULL;
AVDictionary *options = NULL;
int ret;
int i;

seg->segment_count = 0;
if (!seg->write_header_trailer)
@@ -675,6 +676,13 @@ static int seg_write_header(AVFormatContext *s)
}
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)
s->avoid_negative_ts = 1;



Loading…
Cancel
Save