X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Foggparseogm.c;h=d7fc426e6cfac976ffded687c232a57a8abd30ad;hb=c9024a9fd7ea7980f876a65816da8da78dd9d88d;hp=9526c3acc176726ccb9d74b9ad876ec4d2109614;hpb=e65ab9d94f1c8d8893e32d90467d9525625d306a;p=ffmpeg diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c index 9526c3acc17..d7fc426e6cf 100644 --- a/libavformat/oggparseogm.c +++ b/libavformat/oggparseogm.c @@ -27,6 +27,7 @@ #include "libavcodec/get_bits.h" #include "libavcodec/bytestream.h" #include "avformat.h" +#include "internal.h" #include "oggdec.h" #include "riff.h" @@ -79,15 +80,13 @@ ogm_header(AVFormatContext *s, int idx) if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){ st->codec->width = bytestream_get_le32(&p); st->codec->height = bytestream_get_le32(&p); - st->codec->time_base.den = spu * 10000000; - st->codec->time_base.num = time_unit; - av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); + avpriv_set_pts_info(st, 64, time_unit, spu * 10000000); } else { st->codec->channels = bytestream_get_le16(&p); p += 2; /* block_align */ st->codec->bit_rate = bytestream_get_le32(&p) * 8; st->codec->sample_rate = spu * 10000000 / time_unit; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); } } else if (*p == 3) { if (os->psize > 8) @@ -116,8 +115,7 @@ ogm_dshow_header(AVFormatContext *s, int idx) if(t == 0x05589f80){ st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, AV_RL32(p + 68)); - st->codec->time_base.den = 10000000; - st->codec->time_base.num = AV_RL64(p + 164); + avpriv_set_pts_info(st, 64, AV_RL64(p + 164), 10000000); st->codec->width = AV_RL32(p + 176); st->codec->height = AV_RL32(p + 180); } else if(t == 0x05589f81){