aboutsummaryrefslogtreecommitdiff
path: root/libavformat/oggparsedirac.c
diff options
context:
space:
mode:
authorReimar Döffinger2011-02-05 10:08:29 +0100
committerRonald S. Bultje2011-02-06 16:08:59 -0500
commita351110eea8f8684642dfe7328e14c3755915091 (patch)
treea4c97d415625bed0821fd0f095770b9e49377e9e /libavformat/oggparsedirac.c
parented19fafd486d6ab0d6e1eba80ceaa482a740c556 (diff)
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.c5
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;
}