changeset 6521:adc50c83986d

do not crash by decoding error
author alex
date Sun, 23 Jun 2002 11:34:54 +0000
parents f9a1870bc4a5
children ed8a717a423e
files libmpcodecs/vd_svq1.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_svq1.c	Sun Jun 23 11:01:25 2002 +0000
+++ b/libmpcodecs/vd_svq1.c	Sun Jun 23 11:34:54 2002 +0000
@@ -60,6 +60,8 @@
     if(len<=0) return NULL; // skipped frame
     
     ret=svq1_decode_frame(svq1,data,len);
+    if (ret != 0)
+	return NULL;
     
     mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE, 
 	sh->disp_w, sh->disp_h);