Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-29 01:52:50 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-07-31 19:23:32 +0400
commitb2814b034ee287691a133f11a7443516549f572f (patch)
tree0d824449929401b0f17d7f8f59a8158c6202453a /libavcodec/sp5xdec.c
parent7a539e67f4fc1cc6fa664e3ddc91aec26be5c61c (diff)
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.
Diffstat (limited to 'libavcodec/sp5xdec.c')
-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