Revision b9edbe99 libavformat/ffmenc.c

View differences:

libavformat/ffmenc.c
93 93
    /* header */
94 94
    put_le32(pb, MKTAG('F', 'F', 'M', '1'));
95 95
    put_be32(pb, ffm->packet_size);
96
    /* XXX: store write position in other file ? */
97
    put_be64(pb, ffm->packet_size); /* current write position */
96
    put_be64(pb, 0); /* current write position */
98 97

  
99 98
    put_be32(pb, s->nb_streams);
100 99
    bit_rate = 0;
......
224 223

  
225 224
    put_flush_packet(pb);
226 225

  
227
    if (!url_is_streamed(pb)) {
228
        int64_t size;
229
        /* update the write offset */
230
        size = url_ftell(pb);
231
        url_fseek(pb, 8, SEEK_SET);
232
        put_be64(pb, size);
233
        put_flush_packet(pb);
234
    }
235

  
236 226
    return 0;
237 227
}
238 228

  

Also available in: Unified diff