gsm_parser: fix infinite loop

Fixes Ticket1894
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-07 17:51:59 +01:00
parent 08101e62cb
commit 4d2f83f8ac
1 changed files with 4 additions and 1 deletions

View File

@ -54,7 +54,10 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
s->duration = GSM_FRAME_SIZE * 2;
break;
default:
return AVERROR(EINVAL);
*poutbuf = buf;
*poutbuf_size = buf_size;
av_log(avctx, AV_LOG_ERROR, "Invalid codec_id\n");
return buf_size;
}
}