return pos-3;
}
-
-// static function for stripping audio from a buffer containing an I Frame and its audio
UINT Demuxer::stripAudio(UCHAR* buf, UINT len)
{
UINT read_pos = 0, write_pos = 0;
pattern = (buf[0] << 16) | (buf[1] << 8) | (buf[2]);
while (read_pos + 7 <= len)
{
- pattern = ((pattern << 8) & 0xFFFFFFFF) | buf[read_pos+3];
- if (pattern < 0x000001E0 || pattern > 0x000001EF)
+ pattern = ((pattern & 0xFFFFFF) << 8) | buf[read_pos+3];
+ if (pattern < 0x100|PESTYPE_VID0 || pattern > 0x100|PESTYPE_VIDMAX)
read_pos++;
else
{
ASPECT_16_9 = 3
};
- // Strip audio packets from buffer, leaving video only *static function*
+ // Remove all data from a buffer apart from video PES packets.
+ // Returns the length of the reduced data.
+ // *static function*
static UINT stripAudio(UCHAR* buf, UINT len);
protected: