static void ebml_free(EbmlSyntax *syntax, void *data)

{

    int i, j;

    for (i = 0; syntax[i].id; i++) {

        void *data_off = (char *) data + syntax[i].data_offset;

        switch (syntax[i].type) {

        case EBML_STR:

        case EBML_UTF8:

            av_freep(data_off);

            break;

        case EBML_BIN:

            av_freep(&((EbmlBin *) data_off)->data);

            break;

        case EBML_LEVEL1:

        case EBML_NEST:

            if (syntax[i].list_elem_size) {

                EbmlList *list = data_off;

                char *ptr = list->elem;

                for (j = 0; j < list->nb_elem;

                     j++, ptr += syntax[i].list_elem_size)

                    ebml_free(syntax[i].def.n, ptr);

                av_freep(&list->elem);


            } else

                ebml_free(syntax[i].def.n, data_off);

        default:

            break;

        }

    }

}
static void ebml_free(EbmlSyntax *syntax, void *data)

{

    int i, j;

    for (i = 0; syntax[i].id; i++) {

        void *data_off = (char *) data + syntax[i].data_offset;

        switch (syntax[i].type) {

        case EBML_STR:

        case EBML_UTF8:

            av_freep(data_off);

            break;

        case EBML_BIN:

            av_freep(&((EbmlBin *) data_off)->data);

            break;

        case EBML_LEVEL1:

        case EBML_NEST:

            if (syntax[i].list_elem_size) {

                EbmlList *list = data_off;

                char *ptr = list->elem;

                for (j = 0; j < list->nb_elem;

                     j++, ptr += syntax[i].list_elem_size)

                    ebml_free(syntax[i].def.n, ptr);

                av_freep(&list->elem);


            } else

                ebml_free(syntax[i].def.n, data_off);

        default:

            break;

        }

    }

}
static void FUNC_0(EbmlSyntax *VAR_0, void *VAR_1)

{

    int VAR_2, VAR_3;

    for (VAR_2 = 0; VAR_0[VAR_2].id; VAR_2++) {

        void *data_off = (char *) VAR_1 + VAR_0[VAR_2].data_offset;

        switch (VAR_0[VAR_2].type) {

        case EBML_STR:

        case EBML_UTF8:

            av_freep(data_off);

            break;

        case EBML_BIN:

            av_freep(&((EbmlBin *) data_off)->VAR_1);

            break;

        case EBML_LEVEL1:

        case EBML_NEST:

            if (VAR_0[VAR_2].list_elem_size) {

                EbmlList *list = data_off;

                char *ptr = list->elem;

                for (VAR_3 = 0; VAR_3 < list->nb_elem;

                     VAR_3++, ptr += VAR_0[VAR_2].list_elem_size)

                    FUNC_0(VAR_0[VAR_2].def.n, ptr);

                av_freep(&list->elem);


            } else

                FUNC_0(VAR_0[VAR_2].def.n, data_off);

        default:

            break;

        }

    }

}
static void FUNC_0(EbmlSyntax *VAR_0, void *VAR_1)
{ int VAR_2, VAR_3; for (VAR_2 = 0; VAR_0[VAR_2].id; VAR_2++) { void *data_off = (char *) VAR_1 + VAR_0[VAR_2].data_offset; switch (VAR_0[VAR_2].type) { case EBML_STR:
case EBML_UTF8:
av_freep(data_off); break; case EBML_BIN:
av_freep(&((EbmlBin *) data_off)->VAR_1); break; case EBML_LEVEL1:
case EBML_NEST:
if (VAR_0[VAR_2].list_elem_size) { EbmlList *list = data_off; char *ptr = list->elem; for (VAR_3 = 0; VAR_3 < list->nb_elem; VAR_3++, ptr += VAR_0[VAR_2].list_elem_size)
FUNC_0(VAR_0[VAR_2].def.n, ptr); av_freep(&list->elem); } else FUNC_0(VAR_0[VAR_2].def.n, data_off); default:
break; } } }