static void hevc_parser_close(AVCodecParserContext *s)

{

    HEVCParserContext *ctx = s->priv_data;

    int i;



#if ADVANCED_PARSER

    HEVCContext  *h  = &ctx->h;



    for (i = 0; i < FF_ARRAY_ELEMS(h->ps.vps_list); i++)

        av_buffer_unref(&h->ps.vps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(h->ps.sps_list); i++)

        av_buffer_unref(&h->ps.sps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(h->ps.pps_list); i++)

        av_buffer_unref(&h->ps.pps_list[i]);



    h->ps.sps = NULL;



    av_freep(&h->HEVClc);

#endif



    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.vps_list); i++)

        av_buffer_unref(&ctx->ps.vps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.sps_list); i++)

        av_buffer_unref(&ctx->ps.sps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.pps_list); i++)

        av_buffer_unref(&ctx->ps.pps_list[i]);



    ctx->ps.sps = NULL;



    ff_h2645_packet_uninit(&ctx->pkt);



    av_freep(&ctx->pc.buffer);

}

static void hevc_parser_close(AVCodecParserContext *s)

{

    HEVCParserContext *ctx = s->priv_data;

    int i;



#if ADVANCED_PARSER

    HEVCContext  *h  = &ctx->h;



    for (i = 0; i < FF_ARRAY_ELEMS(h->ps.vps_list); i++)

        av_buffer_unref(&h->ps.vps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(h->ps.sps_list); i++)

        av_buffer_unref(&h->ps.sps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(h->ps.pps_list); i++)

        av_buffer_unref(&h->ps.pps_list[i]);



    h->ps.sps = NULL;



    av_freep(&h->HEVClc);

#endif



    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.vps_list); i++)

        av_buffer_unref(&ctx->ps.vps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.sps_list); i++)

        av_buffer_unref(&ctx->ps.sps_list[i]);

    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.pps_list); i++)

        av_buffer_unref(&ctx->ps.pps_list[i]);



    ctx->ps.sps = NULL;



    ff_h2645_packet_uninit(&ctx->pkt);



    av_freep(&ctx->pc.buffer);

}

static void FUNC_0(AVCodecParserContext *VAR_0)

{

    HEVCParserContext *ctx = VAR_0->priv_data;

    int VAR_1;



#if ADVANCED_PARSER

    HEVCContext  *h  = &ctx->h;



    for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(h->ps.vps_list); VAR_1++)

        av_buffer_unref(&h->ps.vps_list[VAR_1]);

    for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(h->ps.sps_list); VAR_1++)

        av_buffer_unref(&h->ps.sps_list[VAR_1]);

    for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(h->ps.pps_list); VAR_1++)

        av_buffer_unref(&h->ps.pps_list[VAR_1]);



    h->ps.sps = NULL;



    av_freep(&h->HEVClc);

#endif



    for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(ctx->ps.vps_list); VAR_1++)

        av_buffer_unref(&ctx->ps.vps_list[VAR_1]);

    for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(ctx->ps.sps_list); VAR_1++)

        av_buffer_unref(&ctx->ps.sps_list[VAR_1]);

    for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(ctx->ps.pps_list); VAR_1++)

        av_buffer_unref(&ctx->ps.pps_list[VAR_1]);



    ctx->ps.sps = NULL;



    ff_h2645_packet_uninit(&ctx->pkt);



    av_freep(&ctx->pc.buffer);

}

static void FUNC_0(AVCodecParserContext *VAR_0)
{ HEVCParserContext *ctx = VAR_0->priv_data; int VAR_1; #if ADVANCED_PARSER
HEVCContext  *h  = &ctx->h; for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(h->ps.vps_list); VAR_1++) av_buffer_unref(&h->ps.vps_list[VAR_1]); for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(h->ps.sps_list); VAR_1++) av_buffer_unref(&h->ps.sps_list[VAR_1]); for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(h->ps.pps_list); VAR_1++) av_buffer_unref(&h->ps.pps_list[VAR_1]); h->ps.sps = NULL; av_freep(&h->HEVClc); #endif
for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(ctx->ps.vps_list); VAR_1++) av_buffer_unref(&ctx->ps.vps_list[VAR_1]); for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(ctx->ps.sps_list); VAR_1++) av_buffer_unref(&ctx->ps.sps_list[VAR_1]); for (VAR_1 = 0; VAR_1 < FF_ARRAY_ELEMS(ctx->ps.pps_list); VAR_1++) av_buffer_unref(&ctx->ps.pps_list[VAR_1]); ctx->ps.sps = NULL; ff_h2645_packet_uninit(&ctx->pkt); av_freep(&ctx->pc.buffer); }