aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-05-12 02:50:48 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-12 02:50:48 +0000
commit270f8784472a47c2e7801464af3eb2f5f221378a (patch)
tree78543c30fc3f4bda5798cc14513cf38e221a35bc /libavcodec
parent3178a8658450672229ac7602104f9b849ac66d55 (diff)
downloadffmpeg-270f8784472a47c2e7801464af3eb2f5f221378a.tar.gz
segfault fix
Originally committed as revision 3128 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-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);