[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec bitstream.h,1.155,1.156
Rich Felker
dalias
Thu Sep 22 06:02:05 CEST 2005
On Thu, Sep 22, 2005 at 01:18:54AM +0200, Aurelien Jacobs CVS wrote:
> Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
> In directory mail:/var2/tmp/cvs-serv8633/libavcodec
>
> Modified Files:
> bitstream.h
> Log Message:
> fix some pointer to intger without cast warnings (patch by Michel Bardiaux)
>
> Index: bitstream.h
> ===================================================================
> RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/bitstream.h,v
> retrieving revision 1.155
> retrieving revision 1.156
> diff -u -d -r1.155 -r1.156
> --- bitstream.h 20 Sep 2005 18:51:12 -0000 1.155
> +++ bitstream.h 21 Sep 2005 23:18:52 -0000 1.156
> @@ -53,8 +53,10 @@
>
> static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
> {
> - if(buffer_size < 0)
> - buffer= buffer_size= 0;
> + if(buffer_size < 0) {
> + buffer_size = 0;
> + buffer = NULL;
> + }
>
> s->buf = buffer;
> s->buf_end = s->buf + buffer_size;
> @@ -676,8 +678,10 @@
> const uint8_t *buffer, int bit_size)
> {
> int buffer_size= (bit_size+7)>>3;
> - if(buffer_size < 0 || bit_size < 0)
> - buffer= buffer_size= bit_size= 0;
> + if(buffer_size < 0 || bit_size < 0) {
> + buffer_size = bit_size = 0;
> + buffer = NULL;
> + }
Can you explain how either of these involves a pointer to integer
cast? IMO the old versions were fine.
Rich
More information about the ffmpeg-cvslog
mailing list