[vlc-devel] [PATCH v2] codec: jpeg encoder implemented

Maxim Bublis b at codemonkey.ru
Tue Jan 28 11:03:40 CET 2014

> It would be simpler to remove the p_dec member first. It is not really
> needed.

I do not understand quietly how it could be implemented.
jpeg_std_error function requires jpeg_error_mgr structure as input. Unlike
libpng's user_error_fn it doesn't allow to pass custom user data.
As far as I understand C, as jpeg_error_mgr is first attribute in
decoder_sys_t/encoder_sys_t structure, it allows us to cast one to another
and vice versa.
In the same time decoder_sys_t is not first attribute in decoder_t, so we
can't cast decoder_t to jpeg_error_mgr, and cast it from jpeg_error_mgr to
decoder_t inside error handling function.
If I'm mistaken, please, correct me.

Maxim Bublis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140128/e2df1316/attachment.html>

More information about the vlc-devel mailing list