comparison libmpcodecs/vd_svq1.c @ 6521:adc50c83986d

do not crash by decoding error
author alex
date Sun, 23 Jun 2002 11:34:54 +0000
parents a2086150099b
children 1e47c2e7aa8e
comparison
equal deleted inserted replaced
6520:f9a1870bc4a5 6521:adc50c83986d
58 int ret; 58 int ret;
59 59
60 if(len<=0) return NULL; // skipped frame 60 if(len<=0) return NULL; // skipped frame
61 61
62 ret=svq1_decode_frame(svq1,data,len); 62 ret=svq1_decode_frame(svq1,data,len);
63 if (ret != 0)
64 return NULL;
63 65
64 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE, 66 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE,
65 sh->disp_w, sh->disp_h); 67 sh->disp_w, sh->disp_h);
66 if(!mpi) return NULL; 68 if(!mpi) return NULL;
67 69