Revision b7effd4e libavformat/tmv.c

View differences:

libavformat/tmv.c
70 70
    AVRational fps;
71 71
    unsigned comp_method, char_cols, char_rows, features;
72 72

  
73
    if (get_le32(pb) != TMV_TAG)
73
    if (avio_rl32(pb) != TMV_TAG)
74 74
        return -1;
75 75

  
76 76
    if (!(vst = av_new_stream(s, 0)))
......
79 79
    if (!(ast = av_new_stream(s, 0)))
80 80
        return AVERROR(ENOMEM);
81 81

  
82
    ast->codec->sample_rate = get_le16(pb);
82
    ast->codec->sample_rate = avio_rl16(pb);
83 83
    if (!ast->codec->sample_rate) {
84 84
        av_log(s, AV_LOG_ERROR, "invalid sample rate\n");
85 85
        return -1;
86 86
    }
87 87

  
88
    tmv->audio_chunk_size   = get_le16(pb);
88
    tmv->audio_chunk_size   = avio_rl16(pb);
89 89
    if (!tmv->audio_chunk_size) {
90 90
        av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n");
91 91
        return -1;
92 92
    }
93 93

  
94
    comp_method             = get_byte(pb);
94
    comp_method             = avio_r8(pb);
95 95
    if (comp_method) {
96 96
        av_log(s, AV_LOG_ERROR, "unsupported compression method %d\n",
97 97
               comp_method);
98 98
        return -1;
99 99
    }
100 100

  
101
    char_cols = get_byte(pb);
102
    char_rows = get_byte(pb);
101
    char_cols = avio_r8(pb);
102
    char_rows = avio_r8(pb);
103 103
    tmv->video_chunk_size = char_cols * char_rows * 2;
104 104

  
105
    features  = get_byte(pb);
105
    features  = avio_r8(pb);
106 106
    if (features & ~(TMV_PADDING | TMV_STEREO)) {
107 107
        av_log(s, AV_LOG_ERROR, "unsupported features 0x%02x\n",
108 108
               features & ~(TMV_PADDING | TMV_STEREO));

Also available in: Unified diff