summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/g729_parser.c6
1 files changed, 6 insertions, 0 deletions
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) {