diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-07 02:51:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-07 02:51:08 +0200 |
commit | 3726d07a2af8d57f5af57be339c94fe902853e10 (patch) | |
tree | fe9feefe5d0c1c0d9dd5a56ae42cbd96886d567c | |
parent | 4db0e8fd3366eadb2d6374b647b8738208749348 (diff) | |
parent | 28816050e47b6dba430a52e429d21a864cffda8e (diff) | |
download | ffmpeg-3726d07a2af8d57f5af57be339c94fe902853e10.tar.gz |
Merge commit '28816050e47b6dba430a52e429d21a864cffda8e'
* commit '28816050e47b6dba430a52e429d21a864cffda8e':
lavf: Set the stream time base hint properly for chained muxers
Conflicts:
libavformat/segment.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/hdsenc.c | 1 | ||||
-rw-r--r-- | libavformat/hlsenc.c | 1 | ||||
-rw-r--r-- | libavformat/mpegtsenc.c | 1 | ||||
-rw-r--r-- | libavformat/segment.c | 1 | ||||
-rw-r--r-- | libavformat/smoothstreamingenc.c | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 1f77785f95..746797b24c 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -405,6 +405,7 @@ static int hds_write_header(AVFormatContext *s) } avcodec_copy_context(st->codec, s->streams[i]->codec); st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio; + st->time_base = s->streams[i]->time_base; } if (c->streams[c->nb_streams].ctx) c->nb_streams++; diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index b5535727bc..8b180dce5a 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -101,6 +101,7 @@ static int hls_mux_init(AVFormatContext *s) return AVERROR(ENOMEM); avcodec_copy_context(st->codec, s->streams[i]->codec); st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio; + st->time_base = s->streams[i]->time_base; } hls->start_pos = 0; diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 791356c704..d73b75fc92 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -721,6 +721,7 @@ static int mpegts_write_header(AVFormatContext *s) ret = avcodec_copy_context(ast->codec, st->codec); if (ret != 0) goto fail; + ast->time_base = st->time_base; ret = avformat_write_header(ts_st->amux, NULL); if (ret < 0) goto fail; diff --git a/libavformat/segment.c b/libavformat/segment.c index f35bbef8dc..6183208fa2 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -162,6 +162,7 @@ static int segment_mux_init(AVFormatContext *s) ocodec->codec_tag = 0; } st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio; + st->time_base = s->streams[i]->time_base; av_dict_copy(&st->metadata, s->streams[i]->metadata, 0); } diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index d2b7c9e924..cc5433018c 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -343,6 +343,7 @@ static int ism_write_header(AVFormatContext *s) } avcodec_copy_context(st->codec, s->streams[i]->codec); st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio; + st->time_base = s->streams[i]->time_base; ctx->pb = avio_alloc_context(os->iobuf, sizeof(os->iobuf), AVIO_FLAG_WRITE, os, NULL, ism_write, ism_seek); if (!ctx->pb) { |