diff options
author | Reimar Döffinger | 2011-01-31 20:08:56 +0100 |
---|---|---|
committer | Reimar Döffinger | 2011-02-05 09:55:53 +0100 |
commit | 5603df39df36d9de713732da06fe183b188ec963 (patch) | |
tree | a3db37bac78255a929e1bab523e59cd0c6c7c7fd /libavformat/oggparsedirac.c | |
parent | d947bce1fcd0115d1ff286965321f1434d62b45a (diff) |
Always use av_set_pts_info to set the stream time base.
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; } |