[vlc-devel] [PATCH] jpeg: add a comment and an assertion to explain error handling
b at codemonkey.ru
Tue Jan 28 16:48:48 CET 2014
> p_jpeg.err = jpeg_std_error(&p_sys->err);
> + /* XXX: we rely on p_sys->err being the first member of sys_t struct,
> + * so its address is the same than p_sys and we can retrieve p_sys
> + * address in libjpeg error handlers */
> + assert((decoder_sys_t*)p_sys->p_jpeg.err == p_sys);
> p_sys->err.error_exit = user_error_exit;
> p_sys->err.output_message = user_error_message;
I guess it should be p_sys->err after recent changes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel