[08/13] Revert "Rename ff_put_string to avpriv_put_string"

Message ID 1347363979-4676-8-git-send-email-martin@martin.st
State New
Headers show

Commit Message

Martin Storsjö Sept. 11, 2012, 11:46 a.m.
This reverts commit aefea4d0de614a33b12419f7cbac101e2565ca0c.

After getting rid of the needless bitstream writer use in
rtpdec_jpeg, this doesn't need to be used from libavformat any
longer.
---
 libavcodec/bitstream.c     |    2 +-
 libavcodec/mjpegenc.c      |    6 +++---
 libavcodec/mpeg4videoenc.c |    2 +-
 libavcodec/put_bits.h      |    4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

Comments

Luca Barbato Sept. 11, 2012, 4:41 p.m. | #1
On 9/11/12 1:46 PM, Martin Storsjö wrote:
> This reverts commit aefea4d0de614a33b12419f7cbac101e2565ca0c.
>
> After getting rid of the needless bitstream writer use in
> rtpdec_jpeg, this doesn't need to be used from libavformat any
> longer.
> ---

I'd wait for that.
Martin Storsjö Sept. 11, 2012, 7:54 p.m. | #2
On Tue, 11 Sep 2012, Luca Barbato wrote:

> On 9/11/12 1:46 PM, Martin Storsjö wrote:
>> This reverts commit aefea4d0de614a33b12419f7cbac101e2565ca0c.
>> 
>> After getting rid of the needless bitstream writer use in
>> rtpdec_jpeg, this doesn't need to be used from libavformat any
>> longer.
>> ---
>
> I'd wait for that.

Ok, I can hold off this one for now, since it's not necessary.

// Martin

Patch

diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index 93ea9e2..f77b9c4 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -46,7 +46,7 @@  void avpriv_align_put_bits(PutBitContext *s)
     put_bits(s,s->bit_left & 7,0);
 }
 
-void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string)
+void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
 {
     while(*string){
         put_bits(pb, 8, *string);
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index f976e28..d369d36 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -161,7 +161,7 @@  static void jpeg_put_comments(MpegEncContext *s)
     /* JFIF header */
     put_marker(p, APP0);
     put_bits(p, 16, 16);
-    avpriv_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */
+    ff_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */
     put_bits(p, 16, 0x0201); /* v 1.02 */
     put_bits(p, 8, 0); /* units type: 0 - aspect ratio */
     put_bits(p, 16, s->avctx->sample_aspect_ratio.num);
@@ -176,7 +176,7 @@  static void jpeg_put_comments(MpegEncContext *s)
         flush_put_bits(p);
         ptr = put_bits_ptr(p);
         put_bits(p, 16, 0); /* patched later */
-        avpriv_put_string(p, LIBAVCODEC_IDENT, 1);
+        ff_put_string(p, LIBAVCODEC_IDENT, 1);
         size = strlen(LIBAVCODEC_IDENT)+3;
         AV_WB16(ptr, size);
     }
@@ -188,7 +188,7 @@  static void jpeg_put_comments(MpegEncContext *s)
         flush_put_bits(p);
         ptr = put_bits_ptr(p);
         put_bits(p, 16, 0); /* patched later */
-        avpriv_put_string(p, "CS=ITU601", 1);
+        ff_put_string(p, "CS=ITU601", 1);
         size = strlen("CS=ITU601")+3;
         AV_WB16(ptr, size);
     }
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 42d1ba8..9320276 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1022,7 +1022,7 @@  static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n
     if(!(s->flags & CODEC_FLAG_BITEXACT)){
         put_bits(&s->pb, 16, 0);
         put_bits(&s->pb, 16, 0x1B2);    /* user_data */
-        avpriv_put_string(&s->pb, LIBAVCODEC_IDENT, 0);
+        ff_put_string(&s->pb, LIBAVCODEC_IDENT, 0);
     }
 }
 
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index f19a7c6..6e81267 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -98,7 +98,7 @@  static inline void flush_put_bits(PutBitContext *s)
 
 #ifdef BITSTREAM_WRITER_LE
 #define avpriv_align_put_bits align_put_bits_unsupported_here
-#define avpriv_put_string ff_put_string_unsupported_here
+#define ff_put_string ff_put_string_unsupported_here
 #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
 #else
 /**
@@ -111,7 +111,7 @@  void avpriv_align_put_bits(PutBitContext *s);
  *
  * @param terminate_string 0-terminates the written string if value is 1
  */
-void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string);
+void ff_put_string(PutBitContext *pb, const char *string, int terminate_string);
 
 /**
  * Copy the content of src to the bitstream.