Mercurial > libavformat.hg
comparison mov.c @ 1733:377e4b1a4439 libavformat
make vars unsigned
author | bcoudurier |
---|---|
date | Wed, 24 Jan 2007 15:57:41 +0000 |
parents | fc47ca451446 |
children | fc243e5a290e |
comparison
equal
deleted
inserted
replaced
1732:fc47ca451446 | 1733:377e4b1a4439 |
---|---|
1475 static void mov_build_index(MOVContext *mov, AVStream *st) | 1475 static void mov_build_index(MOVContext *mov, AVStream *st) |
1476 { | 1476 { |
1477 MOVStreamContext *sc = st->priv_data; | 1477 MOVStreamContext *sc = st->priv_data; |
1478 offset_t current_offset; | 1478 offset_t current_offset; |
1479 int64_t current_dts = 0; | 1479 int64_t current_dts = 0; |
1480 int stts_index = 0; | 1480 unsigned int stts_index = 0; |
1481 int stsc_index = 0; | 1481 unsigned int stsc_index = 0; |
1482 int stss_index = 0; | 1482 unsigned int stss_index = 0; |
1483 int i, j, k; | 1483 unsigned int i, j, k; |
1484 | 1484 |
1485 if (sc->sample_sizes || st->codec->codec_type == CODEC_TYPE_VIDEO || sc->dv_audio_container) { | 1485 if (sc->sample_sizes || st->codec->codec_type == CODEC_TYPE_VIDEO || sc->dv_audio_container) { |
1486 int keyframe, sample_size; | 1486 unsigned int current_sample = 0; |
1487 int current_sample = 0; | 1487 unsigned int stts_sample = 0; |
1488 int stts_sample = 0; | 1488 unsigned int keyframe, sample_size; |
1489 int distance = 0; | 1489 unsigned int distance = 0; |
1490 | 1490 |
1491 st->nb_frames = sc->sample_count; | 1491 st->nb_frames = sc->sample_count; |
1492 for (i = 0; i < sc->chunk_count; i++) { | 1492 for (i = 0; i < sc->chunk_count; i++) { |
1493 current_offset = sc->chunk_offsets[i]; | 1493 current_offset = sc->chunk_offsets[i]; |
1494 if (stsc_index + 1 < sc->sample_to_chunk_sz && i + 1 == sc->sample_to_chunk[stsc_index + 1].first) | 1494 if (stsc_index + 1 < sc->sample_to_chunk_sz && i + 1 == sc->sample_to_chunk[stsc_index + 1].first) |
1519 stts_index++; | 1519 stts_index++; |
1520 } | 1520 } |
1521 } | 1521 } |
1522 } | 1522 } |
1523 } else { /* read whole chunk */ | 1523 } else { /* read whole chunk */ |
1524 int chunk_samples, chunk_size, chunk_duration; | 1524 unsigned int chunk_samples, chunk_size, chunk_duration; |
1525 | 1525 |
1526 for (i = 0; i < sc->chunk_count; i++) { | 1526 for (i = 0; i < sc->chunk_count; i++) { |
1527 current_offset = sc->chunk_offsets[i]; | 1527 current_offset = sc->chunk_offsets[i]; |
1528 if (stsc_index + 1 < sc->sample_to_chunk_sz && i + 1 == sc->sample_to_chunk[stsc_index + 1].first) | 1528 if (stsc_index + 1 < sc->sample_to_chunk_sz && i + 1 == sc->sample_to_chunk[stsc_index + 1].first) |
1529 stsc_index++; | 1529 stsc_index++; |