According to EN 300 468 section 3.1 (Definitions):
Unless otherwise specified within the present document all
"reserved_future_use" bits is set to "1".
This was not the case for SDT generation so this patch fixes it.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
{
uint8_t section[1024], *q;
unsigned int tot_len;
+ /* reserved_future_use field must be set to 1 for SDT */
+ unsigned int flags = tid == SDT_TID ? 0xf000 : 0xb000;
tot_len = 3 + 5 + len + 4;
/* check if not too big */
q = section;
*q++ = tid;
- put16(&q, 0xb000 | (len + 5 + 4)); /* 5 byte header + 4 byte CRC */
+ put16(&q, flags | (len + 5 + 4)); /* 5 byte header + 4 byte CRC */
put16(&q, id);
*q++ = 0xc1 | (version << 1); /* current_next_indicator = 1 */
*q++ = sec_num;