static int parse_vtrk(AVFormatContext *s,

                      FourxmDemuxContext *fourxm, uint8_t *buf, int size,

                      int left)

{

    AVStream *st;

    /* check that there is enough data */

    if (size != vtrk_SIZE || left < size + 8) {

        return AVERROR_INVALIDDATA;

    }



    /* allocate a new AVStream */

    st = avformat_new_stream(s, NULL);

    if (!st)

        return AVERROR(ENOMEM);



    avpriv_set_pts_info(st, 60, 1, fourxm->fps);



    fourxm->video_stream_index = st->index;



    st->codec->codec_type     = AVMEDIA_TYPE_VIDEO;

    st->codec->codec_id       = AV_CODEC_ID_4XM;

    st->codec->extradata_size = 4;

    st->codec->extradata      = av_malloc(4);

    AV_WL32(st->codec->extradata, AV_RL32(buf + 16));

    st->codec->width  = AV_RL32(buf + 36);

    st->codec->height = AV_RL32(buf + 40);



    return 0;

}

static int parse_vtrk(AVFormatContext *s,

                      FourxmDemuxContext *fourxm, uint8_t *buf, int size,

                      int left)

{

    AVStream *st;

    

    if (size != vtrk_SIZE || left < size + 8) {

        return AVERROR_INVALIDDATA;

    }



    

    st = avformat_new_stream(s, NULL);

    if (!st)

        return AVERROR(ENOMEM);



    avpriv_set_pts_info(st, 60, 1, fourxm->fps);



    fourxm->video_stream_index = st->index;



    st->codec->codec_type     = AVMEDIA_TYPE_VIDEO;

    st->codec->codec_id       = AV_CODEC_ID_4XM;

    st->codec->extradata_size = 4;

    st->codec->extradata      = av_malloc(4);

    AV_WL32(st->codec->extradata, AV_RL32(buf + 16));

    st->codec->width  = AV_RL32(buf + 36);

    st->codec->height = AV_RL32(buf + 40);



    return 0;

}

    st->codec->extradata      = av_malloc(4);
static int FUNC_0(AVFormatContext *VAR_0,

                      FourxmDemuxContext *VAR_1, uint8_t *VAR_2, int VAR_3,

                      int VAR_4)

{

    AVStream *st;

    

    if (VAR_3 != vtrk_SIZE || VAR_4 < VAR_3 + 8) {

        return AVERROR_INVALIDDATA;

    }



    

    st = avformat_new_stream(VAR_0, NULL);

    if (!st)

        return AVERROR(ENOMEM);



    avpriv_set_pts_info(st, 60, 1, VAR_1->fps);



    VAR_1->video_stream_index = st->index;



    st->codec->codec_type     = AVMEDIA_TYPE_VIDEO;

    st->codec->codec_id       = AV_CODEC_ID_4XM;

    st->codec->extradata_size = 4;

    st->codec->extradata      = av_malloc(4);

    AV_WL32(st->codec->extradata, AV_RL32(VAR_2 + 16));

    st->codec->width  = AV_RL32(VAR_2 + 36);

    st->codec->height = AV_RL32(VAR_2 + 40);



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0,
FourxmDemuxContext *VAR_1, uint8_t *VAR_2, int VAR_3,
int VAR_4)
{ AVStream *st; if (VAR_3 != vtrk_SIZE || VAR_4 < VAR_3 + 8) { return AVERROR_INVALIDDATA; } st = avformat_new_stream(VAR_0, NULL); if (!st)
return AVERROR(ENOMEM); avpriv_set_pts_info(st, 60, 1, VAR_1->fps); VAR_1->video_stream_index = st->index; st->codec->codec_type     = AVMEDIA_TYPE_VIDEO; st->codec->codec_id       = AV_CODEC_ID_4XM; st->codec->extradata_size = 4; st->codec->extradata      = av_malloc(4); AV_WL32(st->codec->extradata, AV_RL32(VAR_2 + 16)); st->codec->width  = AV_RL32(VAR_2 + 36); st->codec->height = AV_RL32(VAR_2 + 40); return 0; }