diff wv.c @ 5566:28094e9bd013 libavformat

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.
author conrad
date Thu, 21 Jan 2010 09:47:02 +0000
parents 70956fb584b3
children 536e5527c1e0
line wrap: on
line diff
--- a/wv.c	Wed Jan 20 17:26:14 2010 +0000
+++ b/wv.c	Thu Jan 21 09:47:02 2010 +0000
@@ -168,8 +168,8 @@
     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);