diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-07-28 23:52:50 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-07-31 17:23:32 +0200 |
commit | b2814b034ee287691a133f11a7443516549f572f (patch) | |
tree | 0d824449929401b0f17d7f8f59a8158c6202453a /libavcodec/sp5xdec.c | |
parent | 7a539e67f4fc1cc6fa664e3ddc91aec26be5c61c (diff) | |
download | ffmpeg-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.
Diffstat (limited to 'libavcodec/sp5xdec.c')
-rw-r--r-- | libavcodec/sp5xdec.c | 2 |
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 |