Unified · Split
| @@ -70,8 +70,10 @@ static int wavarc_read_header(AVFormatContext *s) · 69 unmodified lines | ||
| 70 | 70 | if (avio_r8(pb)) |
| 71 | 71 | return AVERROR_INVALIDDATA; |
| 72 | 72 | id = avio_rl32(pb); |
| 73 | + w->data_end = avio_tell(pb); | |
| 73 | 74 | if (avio_read(pb, data, sizeof(data)) != sizeof(data)) |
| 74 | 75 | return AVERROR(EIO); |
| 76 | + w->data_end += 16LL + AV_RL32(data + 4); | |
| 75 | 77 | fmt_len = AV_RL32(data + 32); |
| 76 | 78 | if (fmt_len < 12) |
| 77 | 79 | return AVERROR_INVALIDDATA; |
| @@ -98,8 +100,7 @@ static int wavarc_read_header(AVFormatContext *s) · 20 unmodified lines | ||
| 98 | 100 | if (id != MKTAG('d','a','t','a')) |
| 99 | 101 | avio_skip(pb, avio_rl32(pb)); |
| 100 | 102 | } while (id != MKTAG('d','a','t','a') && !avio_feof(pb)); |
| 101 | − w->data_end = avio_rl32(pb); | |
| 102 | − w->data_end += avio_tell(pb); | |
| 103 | + avio_skip(pb, 4); | |
| 103 | 104 | |
| 104 | 105 | if (AV_RL32(par->extradata + 16) != MKTAG('R','I','F','F')) |
| 105 | 106 | return AVERROR_INVALIDDATA; |