From 9717dad88345bcc7e86ea807cc02b9988004657f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 3 May 2002 23:13:24 +0000 Subject: [PATCH] move put_string() to common.{c,h} Originally committed as revision 439 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/common.c | 9 +++++++++ libavcodec/common.h | 1 + libavcodec/h263.c | 9 --------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libavcodec/common.c b/libavcodec/common.c index 5224299fda..19bf9621cb 100644 --- a/libavcodec/common.c +++ b/libavcodec/common.c @@ -108,6 +108,15 @@ void jflush_put_bits(PutBitContext *s) } #endif +void put_string(PutBitContext * pbc, char *s) +{ + while(*s){ + put_bits(pbc, 8, *s); + s++; + } + put_bits(pbc, 8, 0); +} + /* bit input functions */ void init_get_bits(GetBitContext *s, diff --git a/libavcodec/common.h b/libavcodec/common.h index b365081bc8..b76288bac7 100644 --- a/libavcodec/common.h +++ b/libavcodec/common.h @@ -186,6 +186,7 @@ void init_put_bits(PutBitContext *s, INT64 get_bit_count(PutBitContext *s); /* XXX: change function name */ void align_put_bits(PutBitContext *s); void flush_put_bits(PutBitContext *s); +void put_string(PutBitContext * pbc, char *s); /* jpeg specific put_bits */ void jflush_put_bits(PutBitContext *s); diff --git a/libavcodec/h263.c b/libavcodec/h263.c index d6114ff366..2a44eb0c2e 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -1102,15 +1102,6 @@ static void mpeg4_stuffing(PutBitContext * pbc) put_bits(pbc, length, (1<