aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-28 23:52:50 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-31 17:23:32 +0200
commitb2814b034ee287691a133f11a7443516549f572f (patch)
tree0d824449929401b0f17d7f8f59a8158c6202453a
parent7a539e67f4fc1cc6fa664e3ddc91aec26be5c61c (diff)
downloadffmpeg-b2814b034ee287691a133f11a7443516549f572f.tar.gz
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.
-rw-r--r--libavcodec/sp5xdec.c2
1 files changed, 1 insertions, 1 deletions
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