static int ipmovie_read_packet(AVFormatContext *s,

                               AVPacket *pkt)

{

    IPMVEContext *ipmovie = (IPMVEContext *)s->priv_data;

    ByteIOContext *pb = &s->pb;

    int ret;



    ret = process_ipmovie_chunk(ipmovie, pb, pkt);

    if (ret == CHUNK_BAD)

        ret = AVERROR_INVALIDDATA;

    else if (ret == CHUNK_EOF)

        ret = AVERROR_IO;

    else if (ret == CHUNK_NOMEM)

        ret = AVERROR_NOMEM;

    else

        ret = 0;



    return ret;

}

static int ipmovie_read_packet(AVFormatContext *s,

                               AVPacket *pkt)

{

    IPMVEContext *ipmovie = (IPMVEContext *)s->priv_data;

    ByteIOContext *pb = &s->pb;

    int ret;



    ret = process_ipmovie_chunk(ipmovie, pb, pkt);

    if (ret == CHUNK_BAD)

        ret = AVERROR_INVALIDDATA;

    else if (ret == CHUNK_EOF)

        ret = AVERROR_IO;

    else if (ret == CHUNK_NOMEM)

        ret = AVERROR_NOMEM;

    else

        ret = 0;



    return ret;

}

static int FUNC_0(AVFormatContext *VAR_0,

                               AVPacket *VAR_1)

{

    IPMVEContext *ipmovie = (IPMVEContext *)VAR_0->priv_data;

    ByteIOContext *pb = &VAR_0->pb;

    int VAR_2;



    VAR_2 = process_ipmovie_chunk(ipmovie, pb, VAR_1);

    if (VAR_2 == CHUNK_BAD)

        VAR_2 = AVERROR_INVALIDDATA;

    else if (VAR_2 == CHUNK_EOF)

        VAR_2 = AVERROR_IO;

    else if (VAR_2 == CHUNK_NOMEM)

        VAR_2 = AVERROR_NOMEM;

    else

        VAR_2 = 0;



    return VAR_2;

}

static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{ IPMVEContext *ipmovie = (IPMVEContext *)VAR_0->priv_data; ByteIOContext *pb = &VAR_0->pb; int VAR_2; VAR_2 = process_ipmovie_chunk(ipmovie, pb, VAR_1); if (VAR_2 == CHUNK_BAD)
VAR_2 = AVERROR_INVALIDDATA; else if (VAR_2 == CHUNK_EOF)
VAR_2 = AVERROR_IO; else if (VAR_2 == CHUNK_NOMEM)
VAR_2 = AVERROR_NOMEM; else
VAR_2 = 0; return VAR_2; }