forked from FFmpeg/FFmpeg
avidec: simplify convoluted flow in avi_load_index()
Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
6728aaf6d8
commit
c9403419b2
1 changed files with 7 additions and 11 deletions
|
@ -1241,20 +1241,16 @@ static int avi_load_index(AVFormatContext *s)
|
||||||
(tag >> 16) & 0xff,
|
(tag >> 16) & 0xff,
|
||||||
(tag >> 24) & 0xff,
|
(tag >> 24) & 0xff,
|
||||||
size);
|
size);
|
||||||
switch(tag) {
|
|
||||||
case MKTAG('i', 'd', 'x', '1'):
|
if (tag == MKTAG('i', 'd', 'x', '1') &&
|
||||||
if (avi_read_idx1(s, size) < 0)
|
avi_read_idx1(s, size) >= 0) {
|
||||||
goto skip;
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto the_end;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
skip:
|
|
||||||
size += (size & 1);
|
|
||||||
if (avio_skip(pb, size) < 0)
|
|
||||||
goto the_end; // something is wrong here
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size += (size & 1);
|
||||||
|
if (avio_skip(pb, size) < 0)
|
||||||
|
break; // something is wrong here
|
||||||
}
|
}
|
||||||
the_end:
|
the_end:
|
||||||
avio_seek(pb, pos, SEEK_SET);
|
avio_seek(pb, pos, SEEK_SET);
|
||||||
|
|
Loading…
Add table
Reference in a new issue