Closed saschanaz closed 7 years ago
@SaschaNaz You can have a look at this recent commit in PolyFLIF https://github.com/UprootLabs/poly-flif/commit/d271d337a6600fecfd821d26a5d3ccb423a2b33c for an example use of user_data
.
Thanks, so it seems user_data
is completely user defined rather than decoder specific.
Yup, it lets the user pass a context into the decoder. But the decoder doesn't have to know what it is. It will simply store it as void *
and pass it back to the callback function.
Great, can you add your explanation here?: https://github.com/FLIF-hub/FLIF/blob/2bd9cf51f52e7346a1e6165bdb052899f18a8f50/src/library/flif_dec.h#L73
The PR #383 briefly explains the parameter but not really sure how should it be used, especially when the sample code viewflif.c just passes NULL. Please provide more documentation about it.