static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length)

{

    int ret, i;



    ret = ff_hevc_decode_extradata(buf, length, &s->ps, &s->sei, &s->is_nalff,

                                   &s->nal_length_size, s->avctx->err_recognition,

                                   s->apply_defdispwin, s->avctx);

    if (ret < 0)

        return ret;



    /* export stream parameters from the first SPS */

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

        if (s->ps.sps_list[i]) {

            const HEVCSPS *sps = (const HEVCSPS*)s->ps.sps_list[i]->data;

            export_stream_params(s->avctx, &s->ps, sps);

            break;

        }

    }



    return 0;

}

static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length)

{

    int ret, i;



    ret = ff_hevc_decode_extradata(buf, length, &s->ps, &s->sei, &s->is_nalff,

                                   &s->nal_length_size, s->avctx->err_recognition,

                                   s->apply_defdispwin, s->avctx);

    if (ret < 0)

        return ret;



    

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

        if (s->ps.sps_list[i]) {

            const HEVCSPS *sps = (const HEVCSPS*)s->ps.sps_list[i]->data;

            export_stream_params(s->avctx, &s->ps, sps);

            break;

        }

    }



    return 0;

}

static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length)         if (s->ps.sps_list[i]) {
static int FUNC_0(HEVCContext *VAR_0, uint8_t *VAR_1, int VAR_2)

{

    int VAR_3, VAR_4;



    VAR_3 = ff_hevc_decode_extradata(VAR_1, VAR_2, &VAR_0->ps, &VAR_0->sei, &VAR_0->is_nalff,

                                   &VAR_0->nal_length_size, VAR_0->avctx->err_recognition,

                                   VAR_0->apply_defdispwin, VAR_0->avctx);

    if (VAR_3 < 0)

        return VAR_3;



    

    for (VAR_4 = 0; VAR_4 < FF_ARRAY_ELEMS(VAR_0->ps.sps_list); VAR_4++) {

        if (VAR_0->ps.sps_list[VAR_4]) {

            const HEVCSPS *sps = (const HEVCSPS*)VAR_0->ps.sps_list[VAR_4]->data;

            export_stream_params(VAR_0->avctx, &VAR_0->ps, sps);

            break;

        }

    }



    return 0;

}

static int FUNC_0(HEVCContext *VAR_0, uint8_t *VAR_1, int VAR_2)
{ int VAR_3, VAR_4; VAR_3 = ff_hevc_decode_extradata(VAR_1, VAR_2, &VAR_0->ps, &VAR_0->sei, &VAR_0->is_nalff,
&VAR_0->nal_length_size, VAR_0->avctx->err_recognition,
VAR_0->apply_defdispwin, VAR_0->avctx); if (VAR_3 < 0)
return VAR_3; for (VAR_4 = 0; VAR_4 < FF_ARRAY_ELEMS(VAR_0->ps.sps_list); VAR_4++) { if (VAR_0->ps.sps_list[VAR_4]) { const HEVCSPS *sps = (const HEVCSPS*)VAR_0->ps.sps_list[VAR_4]->data; export_stream_params(VAR_0->avctx, &VAR_0->ps, sps); break; } } return 0; }