mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
libtriple: add workaround for 'odd filter length' problem in cDemux
Origin commit data
------------------
Branch: master
Commit: bad7975133
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-02-06 (Sun, 06 Feb 2011)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -212,13 +212,17 @@ bool cDemux::sectionFilter(unsigned short pid, const unsigned char * const filte
|
||||
const unsigned char * const negmask)
|
||||
{
|
||||
struct demux_filter_para flt;
|
||||
int length;
|
||||
memset(&flt, 0, sizeof(flt));
|
||||
|
||||
if (len > FILTER_LENGTH - 2)
|
||||
fprintf(stderr, "cDemux::sectionFilter #%d: len too long: %d, FILTER_LENGTH: %d\n", num, len, FILTER_LENGTH);
|
||||
|
||||
length = (len + 2 + 1) & 0xfe; /* reportedly, the TD drivers don't handle odd filter */
|
||||
if (length > FILTER_LENGTH) /* lengths well. So make sure the length is a multiple */
|
||||
length = FILTER_LENGTH; /* of 2. The unused mask is zeroed anyway. */
|
||||
flt.pid = pid;
|
||||
flt.filter_length = len + 2 * (len > 1); /* only add the two bytes if required */
|
||||
flt.filter_length = length;
|
||||
flt.filter[0] = filter[0];
|
||||
flt.mask[0] = mask[0];
|
||||
flt.timeout = timeout;
|
||||
|
Reference in New Issue
Block a user