mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Handle input or output len of 0 properly in lzo decoder.
This commit is contained in:
parent
91d51ee4b5
commit
7d5082600e
@ -175,6 +175,14 @@ int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen) {
|
|||||||
int state= 0;
|
int state= 0;
|
||||||
int x;
|
int x;
|
||||||
LZOContext c;
|
LZOContext c;
|
||||||
|
if (!*outlen || !*inlen) {
|
||||||
|
int res = 0;
|
||||||
|
if (!*outlen)
|
||||||
|
res |= AV_LZO_OUTPUT_FULL;
|
||||||
|
if (!*inlen)
|
||||||
|
res |= AV_LZO_INPUT_DEPLETED;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
c.in = in;
|
c.in = in;
|
||||||
c.in_end = (const uint8_t *)in + *inlen;
|
c.in_end = (const uint8_t *)in + *inlen;
|
||||||
c.out = c.out_start = out;
|
c.out = c.out_start = out;
|
||||||
|
Loading…
Reference in New Issue
Block a user