changeset 1766:49b67c70e9c9 libavformat

remove senseless and wrong direct access to ByteIOContext internals
author michael
date Wed, 07 Feb 2007 23:32:51 +0000
parents 420d54aeca16
children f1186797fbf5
files asf-enc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/asf-enc.c	Wed Feb 07 23:22:53 2007 +0000
+++ b/asf-enc.c	Wed Feb 07 23:32:51 2007 +0000
@@ -533,7 +533,7 @@
     ASFContext *asf = s->priv_data;
     ByteIOContext *pb = &s->pb;
     int ppi_size, i;
-    unsigned char *start_ppi_ptr = pb->buf_ptr;
+    int64_t start= url_ftell(pb);
 
     int iLengthTypeFlags = ASF_PPI_LENGTH_TYPE_FLAGS;
 
@@ -565,7 +565,7 @@
     if (asf->multi_payloads_present)
         put_byte(pb, nb_payloads | ASF_PAYLOAD_FLAGS);
 
-    ppi_size = pb->buf_ptr - start_ppi_ptr;
+    ppi_size = url_ftell(pb) - start;
 
     return ppi_size;
 }