From 0fc07ad9515481120d54005717859cb51dfe8019 Mon Sep 17 00:00:00 2001 From: David Conrad Date: Thu, 21 Jan 2010 09:47:02 +0000 Subject: Set start_time and duration in AVStream instead of AVFormatContext for formats with only one stream; the AVFormatContext values will be derived from the AVStream and this helps in calculating stream bitrate. Originally committed as revision 21361 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/wv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/wv.c') diff --git a/libavformat/wv.c b/libavformat/wv.c index 9809b37a15..6290a99412 100644 --- a/libavformat/wv.c +++ b/libavformat/wv.c @@ -168,8 +168,8 @@ static int wv_read_header(AVFormatContext *s, st->codec->sample_rate = wc->rate; st->codec->bits_per_coded_sample = wc->bpp; av_set_pts_info(st, 64, 1, wc->rate); - s->start_time = 0; - s->duration = (int64_t)wc->samples * AV_TIME_BASE / st->codec->sample_rate; + st->start_time = 0; + st->duration = wc->samples; if(!url_is_streamed(s->pb)) { int64_t cur = url_ftell(s->pb); -- cgit v1.2.3