From c0df9d75bd9a3170a793eb1651354076360998e8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 30 Apr 2005 21:43:59 +0000 Subject: switch to native time bases Originally committed as revision 4168 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/nsvdec.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libavformat/nsvdec.c') diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index 7157eb79ee..fa8adf0765 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -300,8 +300,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap) PRINT(("NSV NSVf chunk_size %ld\n", size)); PRINT(("NSV NSVf file_size %Ld\n", file_size)); - duration = get_le32(pb); /* in ms */ - nsv->duration = duration * AV_TIME_BASE / 1000; /* convert */ + nsv->duration = duration = get_le32(pb); /* in ms */ PRINT(("NSV NSVf duration %Ld ms\n", duration)); // XXX: store it in AVStreams @@ -448,10 +447,8 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) st->codec.bits_per_sample = 24; /* depth XXX */ av_set_pts_info(st, 64, framerate.den, framerate.num); - st->codec.frame_rate = framerate.num; - st->codec.frame_rate_base = framerate.den; st->start_time = 0; - st->duration = nsv->duration; + st->duration = av_rescale(nsv->duration, framerate.num, 1000*framerate.den); } if (atag != T_NONE) { #ifndef DISABLE_AUDIO @@ -467,7 +464,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) st->codec.codec_tag = atag; st->codec.codec_id = codec_get_id(nsv_codec_audio_tags, atag); st->start_time = 0; - st->duration = nsv->duration; +// st->duration = nsv->duration; //FIXME st->need_parsing = 1; /* for PCM we will read a chunk later and put correct info */ /* XXX:FIXME */ -- cgit v1.2.3