[PATCH v2 4/5] wmphoto: Implement WMP decoder using jxrlib.
Rémi Bernon
rbernon at codeweavers.com
Mon Jan 18 04:23:34 CST 2021
On 1/16/21 3:51 AM, Esme Povirk (they/them) wrote:
> +static JXR_ERR wmp_stream_Read(struct WMPStream *iface, void *buf, size_t len)
> +{
> + struct wmp_decoder *This = impl_from_WMPStream(iface);
> + ULONG count;
> + if (FAILED(stream_read(This->stream, buf, len, &count)))
> + return WMP_errFileIO;
> + return WMP_errSuccess;
> +}
>
> This might silently return fewer bytes than requested.
Indeed.
>
> +#ifdef SONAME_LIBJXRGLUE
> + return wmp_decoder_create(info, result);
> +#else
> + {
> + WARN("jxrlib support not compiled in!\n");
> + return E_NOINTERFACE;
> + }
> +#endif
>
> I would use an ERR for a missing dependency, not a WARN.
>
Sure. I think I initially intended to ERR in __wine_init_unix_lib, to
reduce the verbosity if decoder_create is called many times but I still
forgot the #else case there.
--
Rémi Bernon <rbernon at codeweavers.com>
More information about the wine-devel
mailing list