]> git.sesse.net Git - ffmpeg/commitdiff
put_bits: make avpriv_put_string() lavc-local
authorAnton Khirnov <anton@khirnov.net>
Mon, 26 Oct 2020 12:41:39 +0000 (13:41 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 28 Oct 2020 12:53:23 +0000 (13:53 +0100)
It has not been used outside of libavcodec since
20f325f320c6e18ee88983870d2a1fee94257293

libavcodec/aacenc.c
libavcodec/bitstream.c
libavcodec/mjpegenc_common.c
libavcodec/mpeg4videoenc.c
libavcodec/put_bits.h
libavcodec/vc2enc.c

index e477089f5ce63500156e94f13054a45089a06744..bb203981b2b9dc9d00821093cbfdae060e77462b 100644 (file)
@@ -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);
 }
 
 /**
index 8be8a678d2651d459391ba5899b187f903c77f3b..36ffdf4abe67838bb638d894178f7cfba2e7f5df 100644 (file)
@@ -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);
index 3038ebde6e15710e4434cf64d1c593dfbb651758..0b82777ec94afe4ee4c887a981d64c2bb641fbdc 100644 (file)
@@ -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);
     }
index a6a15e302c451c9e62b80634c3572513fc603959..72e6f99eaa936700441362cb2a41cd24f68ddad8 100644 (file)
@@ -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);
     }
 }
 
index d7eaa1792e7861a304ff3d1f961b6da43f2e784a..3cdd8a80a84e6e2a0ae87234b92efc5896c53a24 100644 (file)
@@ -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);
 
 /**
index cd25884a63e33dac976c3aa9f16f8653b0015c74..bab9d0f3d55904083caaef5e656c3d639f0262cd 100644 (file)
@@ -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 */