aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@smartjog.com>2006-03-05 12:32:24 +0000
committerMåns Rullgård <mans@mansr.com>2006-03-05 12:32:24 +0000
commit980bbb13d653561d83619350db32ccb5e5248f95 (patch)
tree261fec05572e6c44e1beb3971c98778c68456600
parent7a5b2fa812ce33e729638318e410438f8f12c341 (diff)
downloadffmpeg-980bbb13d653561d83619350db32ccb5e5248f95.tar.gz
Make faac_decode_frame return -1 on error and not 0 which avoids
stalling and infinite loop. Patch by Baptiste COUDURIER <baptiste coudurier at smartjog com> Originally committed as revision 5110 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/faad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/faad.c b/libavcodec/faad.c
index 15e451b758..49cc789a51 100644
--- a/libavcodec/faad.c
+++ b/libavcodec/faad.c
@@ -164,7 +164,7 @@ static int faac_decode_frame(AVCodecContext *avctx,
if(r < 0){
av_log(avctx, AV_LOG_ERROR, "faac: codec init failed: %s\n",
s->faacDecGetErrorMessage(frame_info.error));
- return 0;
+ return -1;
}
avctx->sample_rate = srate;
avctx->channels = channels;
@@ -176,7 +176,7 @@ static int faac_decode_frame(AVCodecContext *avctx,
if (frame_info.error > 0) {
av_log(avctx, AV_LOG_ERROR, "faac: frame decoding failed: %s\n",
s->faacDecGetErrorMessage(frame_info.error));
- return 0;
+ return -1;
}
frame_info.samples *= s->sample_size;