On Mon, Sep 29, 2014 at 10:04:04AM +0200, Benoit Fouet wrote: > Hi, > > ----- Mail original ----- > > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > > --- > > libavcodec/put_bits.h | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h > > index 8081fb9..f16d04a 100644 > > --- a/libavcodec/put_bits.h > > +++ b/libavcodec/put_bits.h > > @@ -63,6 +63,23 @@ static inline void init_put_bits(PutBitContext *s, > > uint8_t *buffer, > > } > > > > /** > > + * Rebase the bit writer onto a reallocted buffer. > > + * > > > > reallocated > Also, IMHO, it should be mentioned that the new buffer has to be larger than > the previous one.
fixed > > > + * @param buffer the buffer where to put bits > > + * @param buffer_size the size in bytes of buffer > > + */ > > +static inline void rebase_put_bits(PutBitContext *s, uint8_t > > *buffer, > > + int buffer_size) > > +{ > > + av_assert0(8*buffer_size > s->size_in_bits); > > + > > + s->buf_end = buffer + buffer_size; > > + s->buf_ptr = buffer + (s->buf_ptr - s->buf); > > + s->buf = buffer; > > + s->size_in_bits = 8 * buffer_size; > > +} > > + > > +/** > > * @return the total number of bits written to the bitstream. > > */ > > static inline int put_bits_count(PutBitContext *s) > > > > LGTM otherwise. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel