comparison libmpcodecs/vd_lzo.c @ 17768:c7b1b78f14bd

free tmp earlier, it is not needed below and might leak on errors otherwise
author reimar
date Wed, 08 Mar 2006 10:50:16 +0000
parents 9fc45fe0d444
children c34ffa6f5fa8
comparison
equal deleted inserted replaced
17767:61227210498e 17768:c7b1b78f14bd
118 MOD_NAME, sh->bih->biBitCount, sh->format, data, len, sh->bih->biSizeImage 118 MOD_NAME, sh->bih->biBitCount, sh->format, data, len, sh->bih->biSizeImage
119 ); 119 );
120 120
121 /* decompress the frame */ 121 /* decompress the frame */
122 r = lzo1x_decompress (data, len, tmp, &w, priv->wrkmem); 122 r = lzo1x_decompress (data, len, tmp, &w, priv->wrkmem);
123 free(tmp);
123 124
124 if (r != LZO_E_OK) { 125 if (r != LZO_E_OK) {
125 /* this should NEVER happen */ 126 /* this should NEVER happen */
126 mp_msg (MSGT_DECVIDEO, MSGL_ERR, 127 mp_msg (MSGT_DECVIDEO, MSGL_ERR,
127 "[%s] internal error - decompression failed: %d\n", MOD_NAME, r); 128 "[%s] internal error - decompression failed: %d\n", MOD_NAME, r);
140 return NULL; 141 return NULL;
141 } 142 }
142 143
143 if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,priv->codec)) return NULL; 144 if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,priv->codec)) return NULL;
144 init_done++; 145 init_done++;
145 free(tmp);
146 } 146 }
147 147
148 mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0, 148 mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0,
149 sh->disp_w, sh->disp_h); 149 sh->disp_w, sh->disp_h);
150 150