Browse Source

packetizer: avoid pointer casting to copy a value

pull/176/head
Steve Lhomme 2 years ago
parent
commit
339f1862dc
  1. 3
      modules/packetizer/startcode_helper.h

3
modules/packetizer/startcode_helper.h

@ -133,7 +133,8 @@ static inline const uint8_t * startcode_FindAnnexB_Bits( const uint8_t *p, const
}
for (end -= 3; p < end; p += 4) {
uint32_t x = *(const uint32_t*)p;
uint32_t x;
memcpy(&x, p, sizeof(x));
if ((x - 0x01010101) & (~x) & 0x80808080)
{
/* matching DW isn't faster */

Loading…
Cancel
Save