Commit b2814b03 authored by Nicolas George's avatar Nicolas George

sp5xdec: sanitize return value.

i is the decoded size of a recoded packet, which is larger
than the original packet. Assume that if decoding succeeded,
all the packet was used.
parent 7a539e67
...@@ -90,7 +90,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, ...@@ -90,7 +90,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
av_free(recoded); av_free(recoded);
return i; return i < 0 ? i : avpkt->size;
} }
#if CONFIG_SP5X_DECODER #if CONFIG_SP5X_DECODER
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment