diff options
author | Georgi Chorbadzhiyski <gf@unixsol.org> | 2011-01-28 18:28:20 +0200 |
---|---|---|
committer | Janne Grunau <janne-ffmpeg@jannau.net> | 2011-01-28 17:46:36 +0100 |
commit | a7827a17c6b3388322350456d445c94b3a82cd25 (patch) | |
tree | 285531a4600510d107ed8632c602b676cdc0c701 /libavformat/mpegtsenc.c | |
parent | 3c802cabba8e85e4f2949c57df947dd1823a15f5 (diff) | |
download | ffmpeg-a7827a17c6b3388322350456d445c94b3a82cd25.tar.gz |
In mpegts "reserved_future_use" field must be set to 1 in SDT table
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>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 3c56830d00..6f35d6fb44 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -128,6 +128,8 @@ static int mpegts_write_section1(MpegTSSection *s, int tid, int id, { 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 */ @@ -136,7 +138,7 @@ static int mpegts_write_section1(MpegTSSection *s, int tid, int id, 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; |