mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 15:32:43 +02:00
libeplayer3: work around duplicate ffmpeg stream ids by comparing stream addresses instead of pids (plus a couple of optimizations)
Origin commit data
------------------
Branch: master
Commit: 908ff30629
Author: martii <m4rtii@gmx.de>
Date: 2014-04-10 (Thu, 10 Apr 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -38,9 +38,9 @@ void PutBits(BitPacker_t * ld, unsigned int code, unsigned int length)
|
||||
|
||||
#ifdef DEBUG_PUTBITS
|
||||
if (ld->debug)
|
||||
dprintf("code = %d, length = %d, bit_buf = 0x%x, bit_left = %d\n",
|
||||
code, length, bit_buf, bit_left);
|
||||
#endif /* DEBUG_PUTBITS */
|
||||
dprintf("code = %d, length = %d, bit_buf = 0x%x, bit_left = %d\n",
|
||||
code, length, bit_buf, bit_left);
|
||||
#endif
|
||||
|
||||
if (length < bit_left) {
|
||||
/* fits into current buffer */
|
||||
@@ -50,10 +50,10 @@ void PutBits(BitPacker_t * ld, unsigned int code, unsigned int length)
|
||||
/* doesn't fit */
|
||||
bit_buf <<= bit_left;
|
||||
bit_buf |= code >> (length - bit_left);
|
||||
ld->Ptr[0] = (char) (bit_buf >> 24);
|
||||
ld->Ptr[1] = (char) (bit_buf >> 16);
|
||||
ld->Ptr[2] = (char) (bit_buf >> 8);
|
||||
ld->Ptr[3] = (char) bit_buf;
|
||||
ld->Ptr[0] = (uint8_t) (bit_buf >> 24);
|
||||
ld->Ptr[1] = (uint8_t) (bit_buf >> 16);
|
||||
ld->Ptr[2] = (uint8_t) (bit_buf >> 8);
|
||||
ld->Ptr[3] = (uint8_t) bit_buf;
|
||||
ld->Ptr += 4;
|
||||
length -= bit_left;
|
||||
bit_buf = code & ((1 << length) - 1);
|
||||
@@ -64,7 +64,7 @@ void PutBits(BitPacker_t * ld, unsigned int code, unsigned int length)
|
||||
#ifdef DEBUG_PUTBITS
|
||||
if (ld->debug)
|
||||
dprintf("bit_left = %d, bit_buf = 0x%x\n", bit_left, bit_buf);
|
||||
#endif /* DEBUG_PUTBITS */
|
||||
#endif
|
||||
|
||||
/* writeback */
|
||||
ld->BitBuffer = bit_buf;
|
||||
@@ -78,7 +78,7 @@ void FlushBits(BitPacker_t * ld)
|
||||
#ifdef DEBUG_PUTBITS
|
||||
if (ld->debug)
|
||||
dprintf("flushing 0x%2.2x\n", ld->BitBuffer >> 24);
|
||||
#endif /* DEBUG_PUTBITS */
|
||||
#endif
|
||||
*ld->Ptr++ = ld->BitBuffer >> 24;
|
||||
ld->BitBuffer <<= 8;
|
||||
ld->Remaining += 8;
|
||||
|
Reference in New Issue
Block a user