diff asf-enc.c @ 1766:49b67c70e9c9 libavformat

remove senseless and wrong direct access to ByteIOContext internals
author michael
date Wed, 07 Feb 2007 23:32:51 +0000
parents 913e0d9b82d3
children 3562fd629c37
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;
 }