int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate)

{

    MPADecodeContext s1, *s = &s1;

    s1.avctx = avctx;



    if (ff_mpa_check_header(head) != 0)

        return -1;



    if (ff_mpegaudio_decode_header(s, head) != 0) {

        return -1;

    }



    switch(s->layer) {

    case 1:

        avctx->frame_size = 384;

        break;

    case 2:

        avctx->frame_size = 1152;

        break;

    default:

    case 3:

        if (s->lsf)

            avctx->frame_size = 576;

        else

            avctx->frame_size = 1152;

        break;

    }



    *sample_rate = s->sample_rate;

    avctx->channels = s->nb_channels;

    avctx->bit_rate = s->bit_rate;

    avctx->sub_id = s->layer;

    return s->frame_size;

}

int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate)

{

    MPADecodeContext s1, *s = &s1;

    s1.avctx = avctx;



    if (ff_mpa_check_header(head) != 0)

        return -1;



    if (ff_mpegaudio_decode_header(s, head) != 0) {

        return -1;

    }



    switch(s->layer) {

    case 1:

        avctx->frame_size = 384;

        break;

    case 2:

        avctx->frame_size = 1152;

        break;

    default:

    case 3:

        if (s->lsf)

            avctx->frame_size = 576;

        else

            avctx->frame_size = 1152;

        break;

    }



    *sample_rate = s->sample_rate;

    avctx->channels = s->nb_channels;

    avctx->bit_rate = s->bit_rate;

    avctx->sub_id = s->layer;

    return s->frame_size;

}

int FUNC_0(AVCodecContext *VAR_0, uint32_t VAR_1, int *VAR_2)

{

    MPADecodeContext s1, *s = &s1;

    s1.VAR_0 = VAR_0;



    if (ff_mpa_check_header(VAR_1) != 0)

        return -1;



    if (ff_mpegaudio_decode_header(s, VAR_1) != 0) {

        return -1;

    }



    switch(s->layer) {

    case 1:

        VAR_0->frame_size = 384;

        break;

    case 2:

        VAR_0->frame_size = 1152;

        break;

    default:

    case 3:

        if (s->lsf)

            VAR_0->frame_size = 576;

        else

            VAR_0->frame_size = 1152;

        break;

    }



    *VAR_2 = s->VAR_2;

    VAR_0->channels = s->nb_channels;

    VAR_0->bit_rate = s->bit_rate;

    VAR_0->sub_id = s->layer;

    return s->frame_size;

}

int FUNC_0(AVCodecContext *VAR_0, uint32_t VAR_1, int *VAR_2)
{ MPADecodeContext s1, *s = &s1; s1.VAR_0 = VAR_0; if (ff_mpa_check_header(VAR_1) != 0)
return -1; if (ff_mpegaudio_decode_header(s, VAR_1) != 0) { return -1; } switch(s->layer) { case 1:
VAR_0->frame_size = 384; break; case 2:
VAR_0->frame_size = 1152; break; default:
case 3:
if (s->lsf)
VAR_0->frame_size = 576; else
VAR_0->frame_size = 1152; break; } *VAR_2 = s->VAR_2; VAR_0->channels = s->nb_channels; VAR_0->bit_rate = s->bit_rate; VAR_0->sub_id = s->layer; return s->frame_size; }