diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-05-01 01:43:59 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-05-01 01:43:59 +0400 |
commit | c0df9d75bd9a3170a793eb1651354076360998e8 (patch) | |
tree | 0f4c75f07fc395d168bf0a7fcd92d6f9d9e9281b /libavformat/rm.c | |
parent | b7782b47c95c26d674df134973d1403e80fe9767 (diff) |
switch to native time bases
Originally committed as revision 4168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rm.c')
-rw-r--r-- | libavformat/rm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/rm.c b/libavformat/rm.c index f4babe4b62..58a3cab460 100644 --- a/libavformat/rm.c +++ b/libavformat/rm.c @@ -316,7 +316,7 @@ static int rm_write_header(AVFormatContext *s) break; case CODEC_TYPE_VIDEO: rm->video_stream = stream; - stream->frame_rate = (float)codec->frame_rate / (float)codec->frame_rate_base; + stream->frame_rate = (float)codec->time_base.den / (float)codec->time_base.num; /* XXX: dummy values */ stream->packet_max_size = 4096; stream->nb_packets = 0; @@ -641,8 +641,8 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) start_time = get_be32(pb); /* start time */ get_be32(pb); /* preroll */ duration = get_be32(pb); /* duration */ - st->start_time = start_time * (AV_TIME_BASE / 1000); - st->duration = duration * (AV_TIME_BASE / 1000); + st->start_time = start_time; + st->duration = duration; get_str8(pb, buf, sizeof(buf)); /* desc */ get_str8(pb, buf, sizeof(buf)); /* mimetype */ codec_data_size = get_be32(pb); @@ -670,7 +670,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) goto fail1; st->codec.width = get_be16(pb); st->codec.height = get_be16(pb); - st->codec.frame_rate_base= 1; + st->codec.time_base.num= 1; fps= get_be16(pb); st->codec.codec_type = CODEC_TYPE_VIDEO; get_be32(pb); @@ -682,7 +682,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) get_buffer(pb, st->codec.extradata, st->codec.extradata_size); // av_log(NULL, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2); - st->codec.frame_rate = fps * st->codec.frame_rate_base; + st->codec.time_base.den = fps * st->codec.time_base.num; /* modification of h263 codec version (!) */ #ifdef WORDS_BIGENDIAN h263_hack_version = ((uint32_t*)st->codec.extradata)[1]; |