diff --git a/libavcodec/g729_parser.c b/libavcodec/g729_parser.c index 5a57025d62..010f688104 100644 --- a/libavcodec/g729_parser.c +++ b/libavcodec/g729_parser.c @@ -53,6 +53,12 @@ static int g729_parse(AVCodecParserContext *s1, AVCodecContext *avctx, s->duration = avctx->frame_size; } + if (!s->block_size) { + *poutbuf = buf; + *poutbuf_size = buf_size; + return buf_size; + } + if (!s->remaining) s->remaining = s->block_size; if (s->remaining <= buf_size) {