summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-25 11:34:26 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-25 11:34:26 +0000
commite0130159809dc6753f630d321ddd1d82409ae351 (patch)
tree02523803e93b3261f814e5986066472525fb3677 /libavformat
parent3a957df49e636a3ddd8cbc2bd82917c733573384 (diff)
downloadffmpeg-e0130159809dc6753f630d321ddd1d82409ae351.tar.gz
fix duration for ima4
Originally committed as revision 12197 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/aiff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index 1fcfd881b4..dede1d6fe4 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -131,6 +131,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
break;
case CODEC_ID_ADPCM_IMA_QT:
codec->block_align = 34*codec->channels;
+ codec->frame_size = 64;
break;
default:
break;
@@ -390,7 +391,8 @@ got_sound:
av_set_pts_info(st, 64, 1, st->codec->sample_rate);
st->start_time = 0;
- st->duration = st->nb_frames;
+ st->duration = st->codec->frame_size ?
+ st->nb_frames * st->codec->frame_size : st->nb_frames;
/* Position the stream at the first block */
url_fseek(pb, offset, SEEK_SET);