diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-05-03 23:13:24 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-05-03 23:13:24 +0000 |
commit | 9717dad88345bcc7e86ea807cc02b9988004657f (patch) | |
tree | 6d8fb36a5c28083a624f3aeabcfcbc7864e16890 | |
parent | 1c3a2382d04168a233657c9ce79b9913d927bc0f (diff) | |
download | ffmpeg-9717dad88345bcc7e86ea807cc02b9988004657f.tar.gz |
move put_string() to common.{c,h}
Originally committed as revision 439 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/common.c | 9 | ||||
-rw-r--r-- | libavcodec/common.h | 1 | ||||
-rw-r--r-- | 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<<length)-1); } -static void put_string(PutBitContext * pbc, char *s) -{ - while(*s){ - put_bits(pbc, 8, *s); - s++; - } - put_bits(pbc, 8, 0); -} - /* must be called before writing the header */ void ff_set_mpeg4_time(MpegEncContext * s, int picture_number){ int time_div, time_mod; |