changeset 3843:b60ab685d415 libavformat

remove header_byte_count_offset from context
author bcoudurier
date Sun, 31 Aug 2008 03:42:05 +0000
parents c4e0e02a4832
children b597c00051a6
files mxfenc.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mxfenc.c	Sun Aug 31 03:36:25 2008 +0000
+++ b/mxfenc.c	Sun Aug 31 03:42:05 2008 +0000
@@ -65,7 +65,6 @@
 };
 
 typedef struct MXFContext {
-    int64_t header_byte_count_offset;
     int64_t footer_partition_offset;
     int essence_container_count;
     uint8_t essence_containers_indices[sizeof(mxf_essence_container_uls)/
@@ -681,6 +680,7 @@
 {
     MXFContext *mxf = s->priv_data;
     ByteIOContext *pb = s->pb;
+    int64_t header_byte_count_offset;
 
     // write klv
     put_buffer(pb, key, 16);
@@ -698,7 +698,7 @@
     put_be64(pb, mxf->footer_partition_offset); // footerPartition
 
     // set offset
-    mxf->header_byte_count_offset = url_ftell(pb);
+    header_byte_count_offset = url_ftell(pb);
     put_be64(pb, 0); // headerByteCount, update later
 
     // no indexTable
@@ -719,7 +719,7 @@
         mxf_write_header_metadata_sets(s);
         pos = url_ftell(s->pb);
         // update header_byte_count
-        url_fseek(pb, mxf->header_byte_count_offset, SEEK_SET);
+        url_fseek(pb, header_byte_count_offset, SEEK_SET);
         put_be64(pb, pos - start);
         url_fseek(pb, pos, SEEK_SET);
     }