summaryrefslogtreecommitdiff
path: root/libavformat/ape.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-01-21 09:47:02 +0000
committerDavid Conrad <lessen42@gmail.com>2010-01-21 09:47:02 +0000
commit0fc07ad9515481120d54005717859cb51dfe8019 (patch)
tree5674ad8baa6867b10c0d79ade516796e072b3c02 /libavformat/ape.c
parent1f630b97178cdf1637c96f0eecd0975cde30bb7c (diff)
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
Diffstat (limited to 'libavformat/ape.c')
-rw-r--r--libavformat/ape.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index cc2e657b99..a881138431 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -310,8 +310,8 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
st->codec->frame_size = MAC_SUBFRAME_SIZE;
st->nb_frames = ape->totalframes;
- s->start_time = 0;
- s->duration = (int64_t) total_blocks * AV_TIME_BASE / ape->samplerate;
+ st->start_time = 0;
+ st->duration = total_blocks / MAC_SUBFRAME_SIZE;
av_set_pts_info(st, 64, MAC_SUBFRAME_SIZE, ape->samplerate);
st->codec->extradata = av_malloc(APE_EXTRADATA_SIZE);