diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-07 17:51:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-07 18:08:23 +0100 |
commit | 4d2f83f8acb6c6444c3b276e15c5369d28b7c037 (patch) | |
tree | f95a521cf0530d965ea8b38b8c065a98c021e6bd | |
parent | 08101e62cbde7df9749e297e53915e58195bc1b3 (diff) | |
download | ffmpeg-4d2f83f8acb6c6444c3b276e15c5369d28b7c037.tar.gz |
gsm_parser: fix infinite loop
Fixes Ticket1894
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/gsm_parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/gsm_parser.c b/libavcodec/gsm_parser.c index 1d381fc109..dd26f7df11 100644 --- a/libavcodec/gsm_parser.c +++ b/libavcodec/gsm_parser.c @@ -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; } } |