aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRudolf Polzer <divVerent@xonotic.org>2011-04-14 11:12:57 +0200
committerLuca Barbato <lu_zero@gentoo.org>2011-04-14 13:51:26 +0200
commit0a962e61e956addb7cdc829e41b82fd76bea55db (patch)
tree4f12fea25be8446fce069bd20c66cd74328281d4
parent302152d40b6858edca89ad1b5f86a029c323f8c3 (diff)
downloadffmpeg-0a962e61e956addb7cdc829e41b82fd76bea55db.tar.gz
mpegts: force the default timebase
The mpegts muxer does not set the stream time base using av_set_pts_info, but expects it to have the default value of 1/90000. If the calling code changes stream pts before writing the header, other muxers override the time base at that point (like mpegenc.c).
-rw-r--r--libavformat/mpegtsenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 40b906e332..35db93be40 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -479,6 +479,7 @@ static int mpegts_write_header(AVFormatContext *s)
/* assign pids to each stream */
for(i = 0;i < s->nb_streams; i++) {
st = s->streams[i];
+ av_set_pts_info(st, 33, 1, 90000);
ts_st = av_mallocz(sizeof(MpegTSWriteStream));
if (!ts_st)
goto fail;