From b2814b034ee287691a133f11a7443516549f572f Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Sat, 28 Jul 2012 23:52:50 +0200 Subject: 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. --- libavcodec/sp5xdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/sp5xdec.c') diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c index 04ddf09fff..d3efa65674 100644 --- a/libavcodec/sp5xdec.c +++ b/libavcodec/sp5xdec.c @@ -90,7 +90,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, av_free(recoded); - return i; + return i < 0 ? i : avpkt->size; } #if CONFIG_SP5X_DECODER -- cgit v1.2.3