static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx,

                     const uint8_t **poutbuf, int *poutbuf_size,

                     const uint8_t *buf, int buf_size)

{

    DCAParseContext *pc1 = s->priv_data;

    ParseContext *pc = &pc1->pc;

    int next, duration, sample_rate;



    if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {

        next = buf_size;

    } else {

        next = dca_find_frame_end(pc1, buf, buf_size);



        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {

            *poutbuf      = NULL;

            *poutbuf_size = 0;

            return buf_size;

        }

    }



    /* read the duration and sample rate from the frame header */

    if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) {

        s->duration        = duration;

        avctx->sample_rate = sample_rate;

    } else

        s->duration = 0;



    *poutbuf      = buf;

    *poutbuf_size = buf_size;

    return next;

}

static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx,

                     const uint8_t **poutbuf, int *poutbuf_size,

                     const uint8_t *buf, int buf_size)

{

    DCAParseContext *pc1 = s->priv_data;

    ParseContext *pc = &pc1->pc;

    int next, duration, sample_rate;



    if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {

        next = buf_size;

    } else {

        next = dca_find_frame_end(pc1, buf, buf_size);



        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {

            *poutbuf      = NULL;

            *poutbuf_size = 0;

            return buf_size;

        }

    }



    

    if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) {

        s->duration        = duration;

        avctx->sample_rate = sample_rate;

    } else

        s->duration = 0;



    *poutbuf      = buf;

    *poutbuf_size = buf_size;

    return next;

}

        avctx->sample_rate = sample_rate;
static int FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,

                     const uint8_t **VAR_2, int *VAR_3,

                     const uint8_t *VAR_4, int VAR_5)

{

    DCAParseContext *pc1 = VAR_0->priv_data;

    ParseContext *pc = &pc1->pc;

    int VAR_6, VAR_7, VAR_8;



    if (VAR_0->flags & PARSER_FLAG_COMPLETE_FRAMES) {

        VAR_6 = VAR_5;

    } else {

        VAR_6 = dca_find_frame_end(pc1, VAR_4, VAR_5);



        if (ff_combine_frame(pc, VAR_6, &VAR_4, &VAR_5) < 0) {

            *VAR_2      = NULL;

            *VAR_3 = 0;

            return VAR_5;

        }

    }



    

    if (!dca_parse_params(VAR_4, VAR_5, &VAR_7, &VAR_8, &pc1->framesize)) {

        VAR_0->VAR_7        = VAR_7;

        VAR_1->VAR_8 = VAR_8;

    } else

        VAR_0->VAR_7 = 0;



    *VAR_2      = VAR_4;

    *VAR_3 = VAR_5;

    return VAR_6;

}

static int FUNC_0(AVCodecParserContext *VAR_0, AVCodecContext *VAR_1,
const uint8_t **VAR_2, int *VAR_3,
const uint8_t *VAR_4, int VAR_5)
{ DCAParseContext *pc1 = VAR_0->priv_data; ParseContext *pc = &pc1->pc; int VAR_6, VAR_7, VAR_8; if (VAR_0->flags & PARSER_FLAG_COMPLETE_FRAMES) { VAR_6 = VAR_5; } else { VAR_6 = dca_find_frame_end(pc1, VAR_4, VAR_5); if (ff_combine_frame(pc, VAR_6, &VAR_4, &VAR_5) < 0) { *VAR_2      = NULL; *VAR_3 = 0; return VAR_5; } } if (!dca_parse_params(VAR_4, VAR_5, &VAR_7, &VAR_8, &pc1->framesize)) { VAR_0->VAR_7        = VAR_7; VAR_1->VAR_8 = VAR_8; } else VAR_0->VAR_7 = 0; *VAR_2      = VAR_4; *VAR_3 = VAR_5; return VAR_6; }