Update vwebp

... with updated mux API calls.

Change-Id: I0f8a36eeffaeb041964ec4f582e369d48bba4978
This commit is contained in:
Urvang Joshi 2012-06-07 17:19:02 +05:30
parent 6d5c797cee
commit f3bab8eb27

View File

@ -68,17 +68,9 @@ static void ClearPreviousPic(void) {
kParams.pic = NULL; 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) { static void ClearParams(void) {
ClearPreviousPic(); ClearPreviousPic();
ClearData(&kParams.data); WebPDataClear(&kParams.data);
WebPMuxDelete(kParams.mux); WebPMuxDelete(kParams.mux);
kParams.mux = NULL; kParams.mux = NULL;
} }
@ -290,8 +282,7 @@ int main(int argc, char *argv[]) {
goto Error; goto Error;
} }
kParams.mux = kParams.mux = WebPMuxCreate(&kParams.data, 0);
WebPMuxCreate(kParams.data.bytes_, kParams.data.size_, 0, NULL);
if (kParams.mux == NULL) { if (kParams.mux == NULL) {
fprintf(stderr, "Could not create demuxing object!\n"); fprintf(stderr, "Could not create demuxing object!\n");
goto Error; goto Error;