[FFmpeg-cvslog] hls: fix timebase
Michael Niedermayer
git at videolan.org
Thu Mar 7 13:47:38 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 7 13:42:12 2013 +0100| [a12a618aa9c6d84ec3c01695fb5aec9796453a6d] | committer: Michael Niedermayer
hls: fix timebase
Fixes Ticket1733
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a12a618aa9c6d84ec3c01695fb5aec9796453a6d
---
libavformat/hls.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 4e7af90..7de6059 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -590,12 +590,14 @@ static int hls_read_header(AVFormatContext *s)
/* Create new AVStreams for each stream in this variant */
for (j = 0; j < v->ctx->nb_streams; j++) {
AVStream *st = avformat_new_stream(s, NULL);
+ AVStream *ist = v->ctx->streams[j];
if (!st) {
ret = AVERROR(ENOMEM);
goto fail;
}
ff_program_add_stream_index(s, i, stream_offset + j);
st->id = i;
+ avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
avcodec_copy_context(st->codec, v->ctx->streams[j]->codec);
if (v->bandwidth)
av_dict_set(&st->metadata, "variant_bitrate", bitrate_str,
More information about the ffmpeg-cvslog
mailing list