static int aacPlus_encode_frame(AVCodecContext *avctx, AVPacket *pkt,

                                const AVFrame *frame, int *got_packet)

{

    aacPlusAudioContext *s = avctx->priv_data;

    int32_t *input_buffer = (int32_t *)frame->data[0];

    int ret;



    if ((ret = ff_alloc_packet2(avctx, pkt, s->max_output_bytes)))

        return ret;



    pkt->size = aacplusEncEncode(s->aacplus_handle, input_buffer,

                                 s->samples_input, pkt->data, pkt->size);

    *got_packet   = 1;

    pkt->pts      = frame->pts;

    return 0;

}

static int aacPlus_encode_frame(AVCodecContext *avctx, AVPacket *pkt,

                                const AVFrame *frame, int *got_packet)

{

    aacPlusAudioContext *s = avctx->priv_data;

    int32_t *input_buffer = (int32_t *)frame->data[0];

    int ret;



    if ((ret = ff_alloc_packet2(avctx, pkt, s->max_output_bytes)))

        return ret;



    pkt->size = aacplusEncEncode(s->aacplus_handle, input_buffer,

                                 s->samples_input, pkt->data, pkt->size);

    *got_packet   = 1;

    pkt->pts      = frame->pts;

    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,

                                const AVFrame *VAR_2, int *VAR_3)

{

    aacPlusAudioContext *s = VAR_0->priv_data;

    int32_t *input_buffer = (int32_t *)VAR_2->data[0];

    int VAR_4;



    if ((VAR_4 = ff_alloc_packet2(VAR_0, VAR_1, s->max_output_bytes)))

        return VAR_4;



    VAR_1->size = aacplusEncEncode(s->aacplus_handle, input_buffer,

                                 s->samples_input, VAR_1->data, VAR_1->size);

    *VAR_3   = 1;

    VAR_1->pts      = VAR_2->pts;

    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{ aacPlusAudioContext *s = VAR_0->priv_data; int32_t *input_buffer = (int32_t *)VAR_2->data[0]; int VAR_4; if ((VAR_4 = ff_alloc_packet2(VAR_0, VAR_1, s->max_output_bytes)))
return VAR_4; VAR_1->size = aacplusEncEncode(s->aacplus_handle, input_buffer,
s->samples_input, VAR_1->data, VAR_1->size); *VAR_3   = 1; VAR_1->pts      = VAR_2->pts; return 0; }