diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-04-30 21:43:59 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-04-30 21:43:59 +0000 |
commit | c0df9d75bd9a3170a793eb1651354076360998e8 (patch) | |
tree | 0f4c75f07fc395d168bf0a7fcd92d6f9d9e9281b /libavformat/raw.c | |
parent | b7782b47c95c26d674df134973d1403e80fe9767 (diff) | |
download | ffmpeg-c0df9d75bd9a3170a793eb1651354076360998e8.tar.gz |
switch to native time bases
Originally committed as revision 4168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index a0bbbce4f3..b33cdf9533 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -63,8 +63,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) av_set_pts_info(st, 64, 1, st->codec.sample_rate); break; case CODEC_TYPE_VIDEO: - st->codec.frame_rate = ap->frame_rate; - st->codec.frame_rate_base = ap->frame_rate_base; + av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); st->codec.width = ap->width; st->codec.height = ap->height; st->codec.pix_fmt = ap->pix_fmt; @@ -238,12 +237,10 @@ static int video_read_header(AVFormatContext *s, /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ if (st->codec.codec_id == CODEC_ID_MJPEG || st->codec.codec_id == CODEC_ID_MPEG4) { - if (ap && ap->frame_rate) { - st->codec.frame_rate = ap->frame_rate; - st->codec.frame_rate_base = ap->frame_rate_base; + if (ap && ap->time_base.num) { + av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); } else { - st->codec.frame_rate = 25; - st->codec.frame_rate_base = 1; + av_set_pts_info(st, 64, 1, 25); } } return 0; |