[FFmpeg-cvslog] put_bits: make avpriv_put_string() lavc-local

Anton Khirnov git at videolan.org
Wed Oct 28 15:26:28 EET 2020


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Oct 26 13:41:39 2020 +0100| [944ba30db0bda967305690fbfeed4ce6f1e976b2] | committer: Anton Khirnov

put_bits: make avpriv_put_string() lavc-local

It has not been used outside of libavcodec since
20f325f320c6e18ee88983870d2a1fee94257293

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=944ba30db0bda967305690fbfeed4ce6f1e976b2
---

 libavcodec/aacenc.c          | 2 +-
 libavcodec/bitstream.c       | 3 +--
 libavcodec/mjpegenc_common.c | 6 +++---
 libavcodec/mpeg4videoenc.c   | 2 +-
 libavcodec/put_bits.h        | 4 ++--
 libavcodec/vc2enc.c          | 4 ++--
 6 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index e477089f5c..bb203981b2 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -85,7 +85,7 @@ static void put_pce(PutBitContext *pb, AVCodecContext *avctx)
 
     align_put_bits(pb);
     put_bits(pb, 8, strlen(aux_data));
-    avpriv_put_string(pb, aux_data, 0);
+    ff_put_string(pb, aux_data, 0);
 }
 
 /**
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index 8be8a678d2..36ffdf4abe 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -52,8 +52,7 @@ void avpriv_align_put_bits(PutBitContext *s)
 }
 #endif
 
-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_common.c b/libavcodec/mjpegenc_common.c
index 3038ebde6e..0b82777ec9 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -181,7 +181,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
         /* 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 */
         /* The most significant byte is used for major revisions, the least
          * significant byte for minor revisions. Version 1.02 is the current
          * released revision. */
@@ -199,7 +199,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
         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);
     }
@@ -212,7 +212,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
         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 a6a15e302c..72e6f99eaa 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1054,7 +1054,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
     if (!(s->avctx->flags & AV_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 d7eaa1792e..3cdd8a80a8 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -152,7 +152,7 @@ void avpriv_align_put_bits(PutBitContext *s);
 #endif
 
 #ifdef BITSTREAM_WRITER_LE
-#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
 
@@ -161,7 +161,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,
+void ff_put_string(PutBitContext *pb, const char *string,
                        int terminate_string);
 
 /**
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index cd25884a63..bab9d0f3d5 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -234,7 +234,7 @@ static void encode_parse_info(VC2EncContext *s, enum DiracParseCodes pcode)
     cur_pos = put_bits_count(&s->pb) >> 3;
 
     /* Magic string */
-    avpriv_put_string(&s->pb, "BBCD", 0);
+    ff_put_string(&s->pb, "BBCD", 0);
 
     /* Parse code */
     put_bits(&s->pb, 8, pcode);
@@ -931,7 +931,7 @@ static int encode_frame(VC2EncContext *s, AVPacket *avpkt, const AVFrame *frame,
     /* Encoder version */
     if (aux_data) {
         encode_parse_info(s, DIRAC_PCODE_AUX);
-        avpriv_put_string(&s->pb, aux_data, 1);
+        ff_put_string(&s->pb, aux_data, 1);
     }
 
     /* Picture header */



More information about the ffmpeg-cvslog mailing list