diff options
author | Reimar Döffinger <git@videolan.org> | 2011-02-05 10:08:29 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-06 16:08:59 -0500 |
commit | a351110eea8f8684642dfe7328e14c3755915091 (patch) | |
tree | a4c97d415625bed0821fd0f095770b9e49377e9e /libavformat/oggparsedirac.c | |
parent | ed19fafd486d6ab0d6e1eba80ceaa482a740c556 (diff) | |
download | ffmpeg-a351110eea8f8684642dfe7328e14c3755915091.tar.gz |
Always use av_set_pts_info to set the stream time base.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/oggparsedirac.c')
-rw-r--r-- | libavformat/oggparsedirac.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/oggparsedirac.c b/libavformat/oggparsedirac.c index a7f0401f29..b8ce4fe291 100644 --- a/libavformat/oggparsedirac.c +++ b/libavformat/oggparsedirac.c @@ -42,7 +42,7 @@ static int dirac_header(AVFormatContext *s, int idx) st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_DIRAC; // dirac in ogg always stores timestamps as though the video were interlaced - st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den}; + av_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den); return 1; } @@ -79,8 +79,7 @@ static int old_dirac_header(AVFormatContext *s, int idx) st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_DIRAC; - st->time_base.den = AV_RB32(buf+8); - st->time_base.num = AV_RB32(buf+12); + av_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8)); return 1; } |