Mercurial > libavformat.hg
changeset 3067:2dc78258f848 libavformat
fix duration for ima4
author | bcoudurier |
---|---|
date | Mon, 25 Feb 2008 11:34:26 +0000 |
parents | 5a69d7493dab |
children | 9cc9ff5aff9c |
files | aiff.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/aiff.c Mon Feb 25 10:57:22 2008 +0000 +++ b/aiff.c Mon Feb 25 11:34:26 2008 +0000 @@ -131,6 +131,7 @@ break; case CODEC_ID_ADPCM_IMA_QT: codec->block_align = 34*codec->channels; + codec->frame_size = 64; break; default: break; @@ -390,7 +391,8 @@ 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);