changeset 4873:1800b33b2c15 libavformat

Rename pbBufPtr() to put_bits_ptr(). The new name is more readable and consistent with the FFmpeg naming style.
author stefano
date Mon, 13 Apr 2009 16:59:38 +0000
parents 304a0ea063f0
children 5370b0c1653c
files gif.c mpegenc.c swfenc.c
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/gif.c	Mon Apr 13 16:20:26 2009 +0000
+++ b/gif.c	Mon Apr 13 16:59:38 2009 +0000
@@ -232,9 +232,9 @@
             put_bits(&p, 9, 0x101); /* end of stream */
             flush_put_bits(&p);
         }
-        if(pbBufPtr(&p) - p.buf > 0) {
-            put_byte(pb, pbBufPtr(&p) - p.buf); /* byte count of the packet */
-            put_buffer(pb, p.buf, pbBufPtr(&p) - p.buf); /* the actual buffer */
+        if(put_bits_ptr(&p) - p.buf > 0) {
+            put_byte(pb, put_bits_ptr(&p) - p.buf); /* byte count of the packet */
+            put_buffer(pb, p.buf, put_bits_ptr(&p) - p.buf); /* the actual buffer */
             p.buf_ptr = p.buf; /* dequeue the bytes off the bitstream */
         }
         left-=GIF_CHUNKS;
--- a/mpegenc.c	Mon Apr 13 16:20:26 2009 +0000
+++ b/mpegenc.c	Mon Apr 13 16:59:38 2009 +0000
@@ -114,7 +114,7 @@
         put_bits(&pb, 3, 0); /* stuffing length */
     }
     flush_put_bits(&pb);
-    return pbBufPtr(&pb) - pb.buf;
+    return put_bits_ptr(&pb) - pb.buf;
 }
 
 static int put_system_header(AVFormatContext *ctx, uint8_t *buf,int only_for_stream_id)
@@ -256,7 +256,7 @@
     }
 
     flush_put_bits(&pb);
-    size = pbBufPtr(&pb) - pb.buf;
+    size = put_bits_ptr(&pb) - pb.buf;
     /* patch packet size */
     buf[4] = (size - 6) >> 8;
     buf[5] = (size - 6) & 0xff;
--- a/swfenc.c	Mon Apr 13 16:20:26 2009 +0000
+++ b/swfenc.c	Mon Apr 13 16:59:38 2009 +0000
@@ -102,7 +102,7 @@
     put_bits(&p, nbits, ymax & mask);
 
     flush_put_bits(&p);
-    put_buffer(pb, buf, pbBufPtr(&p) - p.buf);
+    put_buffer(pb, buf, put_bits_ptr(&p) - p.buf);
 }
 
 static void put_swf_line_edge(PutBitContext *pb, int dx, int dy)
@@ -167,7 +167,7 @@
     put_bits(&p, nbits, ty);
 
     flush_put_bits(&p);
-    put_buffer(pb, buf, pbBufPtr(&p) - p.buf);
+    put_buffer(pb, buf, put_bits_ptr(&p) - p.buf);
 }
 
 static int swf_write_header(AVFormatContext *s)
@@ -293,7 +293,7 @@
         put_bits(&p, 5, 0);
 
         flush_put_bits(&p);
-        put_buffer(pb, buf1, pbBufPtr(&p) - p.buf);
+        put_buffer(pb, buf1, put_bits_ptr(&p) - p.buf);
 
         put_swf_end_tag(s);
     }