Commit 4d2f83f8 authored by Michael Niedermayer's avatar Michael Niedermayer

gsm_parser: fix infinite loop

Fixes Ticket1894
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 08101e62
...@@ -54,7 +54,10 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, ...@@ -54,7 +54,10 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
s->duration = GSM_FRAME_SIZE * 2; s->duration = GSM_FRAME_SIZE * 2;
break; break;
default: default:
return AVERROR(EINVAL); *poutbuf = buf;
*poutbuf_size = buf_size;
av_log(avctx, AV_LOG_ERROR, "Invalid codec_id\n");
return buf_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