mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/dhav: Don't truncate return value of avio_skip()
Fixes demuxing files bigger than INT_MAX. Reported-by: jenster Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
0a58fdfd3e
commit
3417379d5e
|
@ -78,10 +78,11 @@ static const uint32_t sample_rates[] = {
|
||||||
static int parse_ext(AVFormatContext *s, int length)
|
static int parse_ext(AVFormatContext *s, int length)
|
||||||
{
|
{
|
||||||
DHAVContext *dhav = s->priv_data;
|
DHAVContext *dhav = s->priv_data;
|
||||||
int index, ret = 0;
|
int64_t ret = 0;
|
||||||
|
|
||||||
while (length > 0) {
|
while (length > 0) {
|
||||||
int type = avio_r8(s->pb);
|
int type = avio_r8(s->pb);
|
||||||
|
int index;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0x80:
|
case 0x80:
|
||||||
|
@ -168,8 +169,7 @@ static int read_chunk(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
DHAVContext *dhav = s->priv_data;
|
DHAVContext *dhav = s->priv_data;
|
||||||
int frame_length, ext_length;
|
int frame_length, ext_length;
|
||||||
int64_t start, end;
|
int64_t start, end, ret;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (avio_feof(s->pb))
|
if (avio_feof(s->pb))
|
||||||
return AVERROR_EOF;
|
return AVERROR_EOF;
|
||||||
|
|
Loading…
Reference in New Issue