static int xan_decode_frame(AVCodecContext *avctx,

                            void *data, int *data_size,

                            AVPacket *avpkt)

{

    XanContext *s = avctx->priv_data;

    int ftype;

    int ret;



    s->pic.reference = 1;

    s->pic.buffer_hints = FF_BUFFER_HINTS_VALID |

                          FF_BUFFER_HINTS_PRESERVE |

                          FF_BUFFER_HINTS_REUSABLE;

    if ((ret = avctx->reget_buffer(avctx, &s->pic))) {

        av_log(s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n");

        return ret;

    }



    ftype = AV_RL32(avpkt->data);

    switch (ftype) {

    case 0:

        ret = xan_decode_frame_type0(avctx, avpkt);

        break;

    case 1:

        ret = xan_decode_frame_type1(avctx, avpkt);

        break;

    default:

        av_log(avctx, AV_LOG_ERROR, "Unknown frame type %d\n", ftype);

        return -1;

    }

    if (ret)

        return ret;



    *data_size = sizeof(AVFrame);

    *(AVFrame*)data = s->pic;



    return avpkt->size;

}

static int xan_decode_frame(AVCodecContext *avctx,

                            void *data, int *data_size,

                            AVPacket *avpkt)

{

    XanContext *s = avctx->priv_data;

    int ftype;

    int ret;



    s->pic.reference = 1;

    s->pic.buffer_hints = FF_BUFFER_HINTS_VALID |

                          FF_BUFFER_HINTS_PRESERVE |

                          FF_BUFFER_HINTS_REUSABLE;

    if ((ret = avctx->reget_buffer(avctx, &s->pic))) {

        av_log(s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n");

        return ret;

    }



    ftype = AV_RL32(avpkt->data);

    switch (ftype) {

    case 0:

        ret = xan_decode_frame_type0(avctx, avpkt);

        break;

    case 1:

        ret = xan_decode_frame_type1(avctx, avpkt);

        break;

    default:

        av_log(avctx, AV_LOG_ERROR, "Unknown frame type %d\n", ftype);

        return -1;

    }

    if (ret)

        return ret;



    *data_size = sizeof(AVFrame);

    *(AVFrame*)data = s->pic;



    return avpkt->size;

}

    ftype = AV_RL32(avpkt->data);         ret = xan_decode_frame_type0(avctx, avpkt);         ret = xan_decode_frame_type1(avctx, avpkt);
static int FUNC_0(AVCodecContext *VAR_0,

                            void *VAR_1, int *VAR_2,

                            AVPacket *VAR_3)

{

    XanContext *s = VAR_0->priv_data;

    int VAR_4;

    int VAR_5;



    s->pic.reference = 1;

    s->pic.buffer_hints = FF_BUFFER_HINTS_VALID |

                          FF_BUFFER_HINTS_PRESERVE |

                          FF_BUFFER_HINTS_REUSABLE;

    if ((VAR_5 = VAR_0->reget_buffer(VAR_0, &s->pic))) {

        av_log(s->VAR_0, AV_LOG_ERROR, "reget_buffer() failed\n");

        return VAR_5;

    }



    VAR_4 = AV_RL32(VAR_3->VAR_1);

    switch (VAR_4) {

    case 0:

        VAR_5 = xan_decode_frame_type0(VAR_0, VAR_3);

        break;

    case 1:

        VAR_5 = xan_decode_frame_type1(VAR_0, VAR_3);

        break;

    default:

        av_log(VAR_0, AV_LOG_ERROR, "Unknown frame type %d\n", VAR_4);

        return -1;

    }

    if (VAR_5)

        return VAR_5;



    *VAR_2 = sizeof(AVFrame);

    *(AVFrame*)VAR_1 = s->pic;



    return VAR_3->size;

}

static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{ XanContext *s = VAR_0->priv_data; int VAR_4; int VAR_5; s->pic.reference = 1; s->pic.buffer_hints = FF_BUFFER_HINTS_VALID |
FF_BUFFER_HINTS_PRESERVE |
FF_BUFFER_HINTS_REUSABLE; if ((VAR_5 = VAR_0->reget_buffer(VAR_0, &s->pic))) { av_log(s->VAR_0, AV_LOG_ERROR, "reget_buffer() failed\n"); return VAR_5; } VAR_4 = AV_RL32(VAR_3->VAR_1); switch (VAR_4) { case 0:
VAR_5 = xan_decode_frame_type0(VAR_0, VAR_3); break; case 1:
VAR_5 = xan_decode_frame_type1(VAR_0, VAR_3); break; default:
av_log(VAR_0, AV_LOG_ERROR, "Unknown frame type %d\n", VAR_4); return -1; } if (VAR_5)
return VAR_5; *VAR_2 = sizeof(AVFrame); *(AVFrame*)VAR_1 = s->pic; return VAR_3->size; }