summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/svq1.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/svq1.c b/libavcodec/svq1.c
index eaf0c3ab8d..97b6db70e3 100644
--- a/libavcodec/svq1.c
+++ b/libavcodec/svq1.c
@@ -715,6 +715,12 @@ static int svq1_decode_frame(AVCodecContext *avctx,
int result, i, x, y, width, height;
AVFrame *pict = data;
+ *data_size=0;
+
+ if(buf==NULL && buf_size==0){
+ return 0;
+ }
+
/* initialize bit buffer */
init_get_bits(&s->gb,buf,buf_size*8);