Fixes demuxing files bigger than INT_MAX.
Unified · Split
| @@ -78,10 +78,11 @@ static const uint32_t sample_rates[] = { · 77 unmodified lines | |||
| 78 | static int parse_ext(AVFormatContext *s, int length) | 78 | static int parse_ext(AVFormatContext *s, int length) |
| 79 | { | 79 | { |
| 80 | DHAVContext *dhav = s->priv_data; | 80 | DHAVContext *dhav = s->priv_data; |
| 81 | int index, ret = 0; | 81 | int64_t ret = 0; |
| 82 | 82 | ||
| 83 | while (length > 0) { | 83 | while (length > 0) { |
| 84 | int type = avio_r8(s->pb); | 84 | int type = avio_r8(s->pb); |
| 85 | int index; | ||
| 85 | 86 | ||
| 86 | switch (type) { | 87 | switch (type) { |
| 87 | case 0x80: | 88 | case 0x80: |
| @@ -168,8 +169,7 @@ static int read_chunk(AVFormatContext *s) · 80 unmodified lines | |||
| 168 | { | 169 | { |
| 169 | DHAVContext *dhav = s->priv_data; | 170 | DHAVContext *dhav = s->priv_data; |
| 170 | int frame_length, ext_length; | 171 | int frame_length, ext_length; |
| 171 | int64_t start, end; | 172 | int64_t start, end, ret; |
| 172 | int ret; | ||
| 173 | 173 | ||
| 174 | if (avio_feof(s->pb)) | 174 | if (avio_feof(s->pb)) |
| 175 | return AVERROR_EOF; | 175 | return AVERROR_EOF; |