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<