Permalink
Browse files

fix some compile errors

- for() loops
- arguments passing
  • Loading branch information...
skal65535 committed Aug 15, 2016
1 parent 46dbc4c commit 3ebbe3e6cd539d5d6249db359ac30a897c422a4f
Showing with 9 additions and 5 deletions.
  1. +2 −2 src/webp-load.c
  2. +7 −3 src/webp-save.c
View
@@ -158,13 +158,13 @@ gboolean load_image(const gchar *filename,
#ifdef WEBP_0_5
if (flags & ANIMATION_FLAG) {
int frames;
int frames, i;
/* Retrieve the number of frames */
WebPMuxNumChunks(mux, WEBP_CHUNK_ANMF, &frames);
/* Loop over each of the frames */
for (int i = 0; i < frames; ++i) {
for (i = 0; i < frames; ++i) {
WebPMuxFrameInfo frame = {0};
/* Retrieve the data for the frame */
View
@@ -243,6 +243,7 @@ gboolean save_layer(gint32 drawable_ID,
/* Save an animation to disk */
gboolean save_animation(gint32 nLayers,
gint32 *allLayers,
FILE *outfile,
WebPSaveParams *params,
GError **error)
{
@@ -259,20 +260,23 @@ gboolean save_animation(gint32 nLayers,
WebPAnimEncoderOptionsInit(&enc_options);
do {
int i;
gint32 drawable_ID = allLayers[0];
/* Create the encoder */
enc = WebPAnimEncoderNew(gimp_drawable_width(drawable_ID),
gimp_drawable_height(drawable_ID),
&enc_options);
/* Encode each layer */
for (int i = 0; i < nLayers; i++) {
for (i = 0; i < nLayers; i++) {
if ((innerStatus = save_layer(allLayers[i],
params,
NULL,
NULL,
TRUE,
enc,
frame_timestamp,
params,
error)) == FALSE) {
break;
}
@@ -365,7 +369,7 @@ gboolean save_image(const gchar *filename,
#ifdef WEBP_0_5
if (params->animation == TRUE) {
status = save_animation(nLayers
status = save_animation(nLayers,
allLayers,
outfile,
params,

0 comments on commit 3ebbe3e

Please sign in to comment.