Revision e63a3628 libavformat/mvi.c

View differences:

libavformat/mvi.c
53 53
    vst->codec->extradata_size = 2;
54 54
    vst->codec->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);
55 55

  
56
    version                  = get_byte(pb);
57
    vst->codec->extradata[0] = get_byte(pb);
58
    vst->codec->extradata[1] = get_byte(pb);
59
    frames_count             = get_le32(pb);
60
    msecs_per_frame          = get_le32(pb);
61
    vst->codec->width        = get_le16(pb);
62
    vst->codec->height       = get_le16(pb);
63
    get_byte(pb);
64
    ast->codec->sample_rate  = get_le16(pb);
65
    mvi->audio_data_size     = get_le32(pb);
66
    get_byte(pb);
67
    player_version           = get_le32(pb);
68
    get_le16(pb);
69
    get_byte(pb);
56
    version                  = avio_r8(pb);
57
    vst->codec->extradata[0] = avio_r8(pb);
58
    vst->codec->extradata[1] = avio_r8(pb);
59
    frames_count             = avio_rl32(pb);
60
    msecs_per_frame          = avio_rl32(pb);
61
    vst->codec->width        = avio_rl16(pb);
62
    vst->codec->height       = avio_rl16(pb);
63
    avio_r8(pb);
64
    ast->codec->sample_rate  = avio_rl16(pb);
65
    mvi->audio_data_size     = avio_rl32(pb);
66
    avio_r8(pb);
67
    player_version           = avio_rl32(pb);
68
    avio_rl16(pb);
69
    avio_r8(pb);
70 70

  
71 71
    if (frames_count == 0 || mvi->audio_data_size == 0)
72 72
        return AVERROR_INVALIDDATA;
......
87 87
    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
88 88
    vst->codec->codec_id   = CODEC_ID_MOTIONPIXELS;
89 89

  
90
    mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24;
90
    mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? avio_rl16 : avio_rl24;
91 91

  
92 92
    mvi->audio_frame_size   = ((uint64_t)mvi->audio_data_size << MVI_FRAC_BITS) / frames_count;
93 93
    mvi->audio_size_counter = (ast->codec->sample_rate * 830 / mvi->audio_frame_size - 1) * mvi->audio_frame_size;

Also available in: Unified diff