From f3bab8eb27bf2fb46e151ca1bcfab2bb2b2c740f Mon Sep 17 00:00:00 2001 From: Urvang Joshi Date: Thu, 7 Jun 2012 17:19:02 +0530 Subject: [PATCH] Update vwebp ... with updated mux API calls. Change-Id: I0f8a36eeffaeb041964ec4f582e369d48bba4978 --- examples/vwebp.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/examples/vwebp.c b/examples/vwebp.c index dc7f2997..a2046fd2 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -68,17 +68,9 @@ static void ClearPreviousPic(void) { kParams.pic = NULL; } -static void ClearData(WebPData* data) { - if (data != NULL) { - free((void*)data->bytes_); - data->bytes_ = NULL; - data->size_ = 0; - } -} - static void ClearParams(void) { ClearPreviousPic(); - ClearData(&kParams.data); + WebPDataClear(&kParams.data); WebPMuxDelete(kParams.mux); kParams.mux = NULL; } @@ -290,8 +282,7 @@ int main(int argc, char *argv[]) { goto Error; } - kParams.mux = - WebPMuxCreate(kParams.data.bytes_, kParams.data.size_, 0, NULL); + kParams.mux = WebPMuxCreate(&kParams.data, 0); if (kParams.mux == NULL) { fprintf(stderr, "Could not create demuxing object!\n"); goto Error;