diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-05-21 10:41:52 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-05-21 10:41:52 +0000 |
commit | e2b9cf4e2e575335c68be1e7e8636b639a442736 (patch) | |
tree | 4368babed269015125575e4e6c86033688c8d9ca | |
parent | 45139adf30cbd487560efa0e5efe104db46960db (diff) | |
download | ffmpeg-e2b9cf4e2e575335c68be1e7e8636b639a442736.tar.gz |
update current_sample number for non split mode
fix chunk split decission
Originally committed as revision 4296 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mov.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index e1a41b10a8..7779ac0a47 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1942,14 +1942,13 @@ again: } #endif //MOV_MINOLTA_FIX + idx = sc->sample_to_chunk_index; + if (idx + 1 < sc->sample_to_chunk_sz && sc->next_chunk >= sc->sample_to_chunk[idx + 1].first) + idx++; + sc->sample_to_chunk_index = idx; #ifdef MOV_SPLIT_CHUNKS /* split chunks into samples */ - if (sc->sample_size == 0) { - idx = sc->sample_to_chunk_index; - if ((idx + 1 < sc->sample_to_chunk_sz) - && (sc->next_chunk >= sc->sample_to_chunk[idx + 1].first)) - idx++; - sc->sample_to_chunk_index = idx; + if (sc->sample_size == 0 || sc->sample_size > 100) { if (idx >= 0 && sc->sample_to_chunk[idx].count != 1) { mov->partial = sc; /* we'll have to get those samples before next chunk */ @@ -1958,6 +1957,8 @@ again: } sc->current_sample++; + }else if(idx + 1 < sc->sample_to_chunk_sz){ + sc->current_sample += sc->sample_size * sc->sample_to_chunk[idx].count; } #endif |