Revision f59d8ff8 libavformat/movenc.c

View differences:

libavformat/movenc.c
40 40
static int64_t updateSize(AVIOContext *pb, int64_t pos)
41 41
{
42 42
    int64_t curpos = url_ftell(pb);
43
    url_fseek(pb, pos, SEEK_SET);
43
    avio_seek(pb, pos, SEEK_SET);
44 44
    avio_wb32(pb, curpos - pos); /* rewrite size */
45
    url_fseek(pb, curpos, SEEK_SET);
45
    avio_seek(pb, curpos, SEEK_SET);
46 46

  
47 47
    return curpos - pos;
48 48
}
......
131 131
        }
132 132
    }
133 133
    curpos = url_ftell(pb);
134
    url_fseek(pb, entryPos, SEEK_SET);
134
    avio_seek(pb, entryPos, SEEK_SET);
135 135
    avio_wb32(pb, index); // rewrite size
136
    url_fseek(pb, curpos, SEEK_SET);
136
    avio_seek(pb, curpos, SEEK_SET);
137 137

  
138 138
    return updateSize(pb, pos);
139 139
}
......
156 156
        }
157 157
    }
158 158
    curpos = url_ftell(pb);
159
    url_fseek(pb, entryPos, SEEK_SET);
159
    avio_seek(pb, entryPos, SEEK_SET);
160 160
    avio_wb32(pb, index); // rewrite size
161
    url_fseek(pb, curpos, SEEK_SET);
161
    avio_seek(pb, curpos, SEEK_SET);
162 162
    return updateSize(pb, pos);
163 163
}
164 164

  
......
2236 2236

  
2237 2237
    /* Write size of mdat tag */
2238 2238
    if (mov->mdat_size+8 <= UINT32_MAX) {
2239
        url_fseek(pb, mov->mdat_pos, SEEK_SET);
2239
        avio_seek(pb, mov->mdat_pos, SEEK_SET);
2240 2240
        avio_wb32(pb, mov->mdat_size+8);
2241 2241
    } else {
2242 2242
        /* overwrite 'wide' placeholder atom */
2243
        url_fseek(pb, mov->mdat_pos - 8, SEEK_SET);
2243
        avio_seek(pb, mov->mdat_pos - 8, SEEK_SET);
2244 2244
        avio_wb32(pb, 1); /* special value: real atom size will be 64 bit value after tag field */
2245 2245
        ffio_wfourcc(pb, "mdat");
2246 2246
        avio_wb64(pb, mov->mdat_size+16);
2247 2247
    }
2248
    url_fseek(pb, moov_pos, SEEK_SET);
2248
    avio_seek(pb, moov_pos, SEEK_SET);
2249 2249

  
2250 2250
    mov_write_moov_tag(pb, mov, s);
2251 2251

  

Also available in: Unified diff