mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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:
parent
ee37f90d5d
commit
bbe38bd951
1 changed files with 7 additions and 2 deletions
|
@ -47,8 +47,13 @@ void
|
|||
GstMpeg2EncStreamWriter::PutBits (guint32 val,
|
||||
gint n)
|
||||
{
|
||||
/* only relevant bits */
|
||||
val &= ~(0xffffffffU << n);
|
||||
/* 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);
|
||||
|
||||
/* write data */
|
||||
while (n >= outcnt) {
|
||||
|
|
Loading…
Reference in a new issue