properly report back encoding error code in WebPFrameCacheAddFrame()

User-hook can fail but error was not propagated back.

Change-Id: Ic79f9543bf767634a127eccfef90af855ff15c34
Also: some ad-hoc clean-up and API dusting. More to come later...
This commit is contained in:
skal
2014-06-11 23:26:47 +02:00
parent 90090d99b5
commit f05fe006c2
2 changed files with 48 additions and 24 deletions

View File

@@ -54,8 +54,9 @@ WebPFrameCache* WebPFrameCacheNew(int width, int height,
void WebPFrameCacheDelete(WebPFrameCache* const cache);
// Given an image described by 'frame', 'info' and 'orig_rect', optimize it for
// WebP, encode it and add it to 'cache'.
// WebP, encode it and add it to 'cache'. 'orig_rect' can be NULL.
// This takes care of frame disposal too, according to 'info->dispose_method'.
// Returns false in case of error (and sets frame->error_code accordingly).
int WebPFrameCacheAddFrame(WebPFrameCache* const cache,
const WebPConfig* const config,
const WebPFrameRect* const orig_rect,