fix header byte count
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 10 Feb 2009 06:09:50 +0000 (06:09 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 10 Feb 2009 06:09:50 +0000 (06:09 +0000)
Originally committed as revision 17119 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mxfenc.c

index 70d27e6..9cd5a40 100644 (file)
@@ -1036,11 +1036,12 @@ static void mxf_write_partition(AVFormatContext *s, int bodysid,
 
     if (write_metadata) {
         // mark the start of the headermetadata and calculate metadata size
-        int64_t pos, start = url_ftell(s->pb);
+        int64_t pos, start;
         unsigned header_byte_count;
 
         mxf_write_klv_fill(s);
 
+        start = url_ftell(s->pb);
         mxf_write_primer_pack(s);
         mxf_write_header_metadata_sets(s);
         pos = url_ftell(s->pb);