Mercurial > libavformat.hg
changeset 5624:71fc72a36677 libavformat
Only set duration for streams where it is likely correct.
Fixes issue1120
author | michael |
---|---|
date | Wed, 03 Feb 2010 00:35:10 +0000 |
parents | d8bfadee68a0 |
children | c76c1e0c50a5 |
files | avidec.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/avidec.c Tue Feb 02 23:53:38 2010 +0000 +++ b/avidec.c Wed Feb 03 00:35:10 2010 +0000 @@ -415,7 +415,6 @@ st->nb_frames = get_le32(pb); st->start_time = 0; - st->duration = st->nb_frames; get_le32(pb); /* buffer size */ get_le32(pb); /* quality */ ast->sample_size = get_le32(pb); /* sample ssize */ @@ -442,6 +441,8 @@ av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1); goto fail; } + if(ast->sample_size == 0) + st->duration = st->nb_frames; ast->frame_offset= ast->cum_len; url_fskip(pb, size - 12 * 4); break;