aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nsvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-04-30 21:43:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-04-30 21:43:59 +0000
commitc0df9d75bd9a3170a793eb1651354076360998e8 (patch)
tree0f4c75f07fc395d168bf0a7fcd92d6f9d9e9281b /libavformat/nsvdec.c
parentb7782b47c95c26d674df134973d1403e80fe9767 (diff)
downloadffmpeg-c0df9d75bd9a3170a793eb1651354076360998e8.tar.gz
switch to native time bases
Originally committed as revision 4168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nsvdec.c')
-rw-r--r--libavformat/nsvdec.c9
1 files changed, 3 insertions, 6 deletions
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 */