Mercurial > libavformat.hg
changeset 3086:d9af71ae9064 libavformat
support keyframes indexes starting at 0, broken files created by omneon, fix ref.mov seeking
author | bcoudurier |
---|---|
date | Tue, 26 Feb 2008 18:27:21 +0000 |
parents | bae59276377f |
children | 00058259d6a7 |
files | mov.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Tue Feb 26 18:21:58 2008 +0000 +++ b/mov.c Tue Feb 26 18:27:21 2008 +0000 @@ -1389,6 +1389,7 @@ unsigned int stts_sample = 0; unsigned int keyframe, sample_size; unsigned int distance = 0; + int key_off = sc->keyframes && sc->keyframes[0] == 1; st->nb_frames = sc->sample_count; for (i = 0; i < sc->chunk_count; i++) { @@ -1401,7 +1402,7 @@ av_log(mov->fc, AV_LOG_ERROR, "wrong sample count\n"); goto out; } - keyframe = !sc->keyframe_count || current_sample + 1 == sc->keyframes[stss_index]; + keyframe = !sc->keyframe_count || current_sample+key_off == sc->keyframes[stss_index]; if (keyframe) { distance = 0; if (stss_index + 1 < sc->keyframe_count)