Commit c9c295ab authored by mru's avatar mru

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>


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5110 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fff838b2
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment