From c0b17ea106b94f79255f81ec36ea50096e1ae985 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 19 Oct 2012 02:53:06 +0200 Subject: [PATCH] roqaudioenc: Fix crash with very small roq files Fixes CID703669 Signed-off-by: Michael Niedermayer --- libavcodec/roqaudioenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c index d69ccbfbe9..bbf9b979fd 100644 --- a/libavcodec/roqaudioenc.c +++ b/libavcodec/roqaudioenc.c @@ -158,6 +158,8 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, context->input_frames++; return 0; } + } + if (context->input_frames < 8) { in = context->frame_buffer; }