mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-01 18:21:04 +00:00
avcodec/prosumer: Simplify code slightly in decompress()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ec28a85107
commit
d3b76c9993
@ -84,16 +84,13 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui
|
|||||||
if (bytestream2_get_bytes_left(gb) <= 0) {
|
if (bytestream2_get_bytes_left(gb) <= 0) {
|
||||||
if (!a)
|
if (!a)
|
||||||
return 0;
|
return 0;
|
||||||
cnt = 4;
|
|
||||||
} else {
|
} else {
|
||||||
pos = bytestream2_tell(gb) ^ 2;
|
pos = bytestream2_tell(gb);
|
||||||
bytestream2_seek(gb, pos, SEEK_SET);
|
bytestream2_seek(gb, pos ^ 2, SEEK_SET);
|
||||||
AV_WN16(&a, bytestream2_peek_le16(gb));
|
AV_WN16(&a, bytestream2_peek_le16(gb));
|
||||||
pos = pos ^ 2;
|
bytestream2_seek(gb, pos + 2, SEEK_SET);
|
||||||
bytestream2_seek(gb, pos, SEEK_SET);
|
|
||||||
bytestream2_skip(gb, 2);
|
|
||||||
cnt = 4;
|
|
||||||
}
|
}
|
||||||
|
cnt = 4;
|
||||||
}
|
}
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
@ -117,12 +114,10 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pos = bytestream2_tell(gb) ^ 2;
|
pos = bytestream2_tell(gb);
|
||||||
bytestream2_seek(gb, pos, SEEK_SET);
|
bytestream2_seek(gb, pos ^ 2, SEEK_SET);
|
||||||
AV_WN16(&a, bytestream2_peek_le16(gb));
|
AV_WN16(&a, bytestream2_peek_le16(gb));
|
||||||
pos = pos ^ 2;
|
bytestream2_seek(gb, pos + 2, SEEK_SET);
|
||||||
bytestream2_seek(gb, pos, SEEK_SET);
|
|
||||||
bytestream2_skip(gb, 2);
|
|
||||||
cnt = 4;
|
cnt = 4;
|
||||||
idx--;
|
idx--;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user