Mercurial > libavformat.hg
changeset 4454:7d1460900c59 libavformat
fix frame size, time rate is not stts duration anymore with time offset
author | bcoudurier |
---|---|
date | Wed, 11 Feb 2009 21:11:19 +0000 |
parents | f9ab71b3ace7 |
children | 01e54ebe6ef7 |
files | mov.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Wed Feb 11 20:19:35 2009 +0000 +++ b/mov.c Wed Feb 11 21:11:19 2009 +0000 @@ -1366,8 +1366,11 @@ av_set_pts_info(st, 64, sc->time_rate, sc->time_scale); if (st->codec->codec_type == CODEC_TYPE_AUDIO && - !st->codec->frame_size && sc->stts_count == 1) - st->codec->frame_size = av_rescale(sc->time_rate, st->codec->sample_rate, sc->time_scale); + !st->codec->frame_size && sc->stts_count == 1) { + st->codec->frame_size = av_rescale(sc->stts_data[0].duration, + st->codec->sample_rate, sc->time_scale); + dprintf(c->fc, "frame size %d\n", st->codec->frame_size); + } if(st->duration != AV_NOPTS_VALUE){ assert(st->duration % sc->time_rate == 0);