Mercurial > libavformat.hg
comparison mov.c @ 771:581bec6f0eb0 libavformat
update current_sample number for non split mode
fix chunk split decission
author | michael |
---|---|
date | Sat, 21 May 2005 10:41:52 +0000 |
parents | 34e05913d999 |
children | c5077fdab490 |
comparison
equal
deleted
inserted
replaced
770:34e05913d999 | 771:581bec6f0eb0 |
---|---|
1940 size=foundsize; | 1940 size=foundsize; |
1941 } | 1941 } |
1942 } | 1942 } |
1943 #endif //MOV_MINOLTA_FIX | 1943 #endif //MOV_MINOLTA_FIX |
1944 | 1944 |
1945 idx = sc->sample_to_chunk_index; | |
1946 if (idx + 1 < sc->sample_to_chunk_sz && sc->next_chunk >= sc->sample_to_chunk[idx + 1].first) | |
1947 idx++; | |
1948 sc->sample_to_chunk_index = idx; | |
1945 #ifdef MOV_SPLIT_CHUNKS | 1949 #ifdef MOV_SPLIT_CHUNKS |
1946 /* split chunks into samples */ | 1950 /* split chunks into samples */ |
1947 if (sc->sample_size == 0) { | 1951 if (sc->sample_size == 0 || sc->sample_size > 100) { |
1948 idx = sc->sample_to_chunk_index; | |
1949 if ((idx + 1 < sc->sample_to_chunk_sz) | |
1950 && (sc->next_chunk >= sc->sample_to_chunk[idx + 1].first)) | |
1951 idx++; | |
1952 sc->sample_to_chunk_index = idx; | |
1953 if (idx >= 0 && sc->sample_to_chunk[idx].count != 1) { | 1952 if (idx >= 0 && sc->sample_to_chunk[idx].count != 1) { |
1954 mov->partial = sc; | 1953 mov->partial = sc; |
1955 /* we'll have to get those samples before next chunk */ | 1954 /* we'll have to get those samples before next chunk */ |
1956 sc->left_in_chunk = sc->sample_to_chunk[idx].count - 1; | 1955 sc->left_in_chunk = sc->sample_to_chunk[idx].count - 1; |
1957 size = (sc->sample_size > 1)?sc->sample_size:sc->sample_sizes[sc->current_sample]; | 1956 size = (sc->sample_size > 1)?sc->sample_size:sc->sample_sizes[sc->current_sample]; |
1958 } | 1957 } |
1959 | 1958 |
1960 sc->current_sample++; | 1959 sc->current_sample++; |
1960 }else if(idx + 1 < sc->sample_to_chunk_sz){ | |
1961 sc->current_sample += sc->sample_size * sc->sample_to_chunk[idx].count; | |
1961 } | 1962 } |
1962 #endif | 1963 #endif |
1963 | 1964 |
1964 readchunk: | 1965 readchunk: |
1965 #ifdef DEBUG | 1966 #ifdef DEBUG |