Wrong optimization from my side. Mpeg2enc works now

Original commit message from CVS:
Wrong optimization from my side. Mpeg2enc works now
This commit is contained in:
Ronald S. Bultje 2003-12-13 18:43:03 +00:00
parent ee37f90d5d
commit bbe38bd951

View file

@ -47,7 +47,12 @@ void
GstMpeg2EncStreamWriter::PutBits (guint32 val, GstMpeg2EncStreamWriter::PutBits (guint32 val,
gint n) gint n)
{ {
/* only relevant bits */ /* only relevant bits. Note that (according to Andrew),
* some CPUs do bitshifts modulo wordsize (32), which
* means that we have to check for n != 32 before
* bitshifting to the relevant bits (i.e. 0xffffffff <<
* 32 == 0xffffffff). */
if (n != 32)
val &= ~(0xffffffffU << n); val &= ~(0xffffffffU << n);
/* write data */ /* write data */