[FFmpeg-devel] [PATCH] In mpegts "reserved_future_use" field must be set to 1 in SDT table

Ronald S. Bultje rsbultje
Wed Jan 26 18:45:46 CET 2011


Hi,

2011/1/25 Georgi Chorbadzhiyski <gf at unixsol.org>:
> Around 01/25/11 13:57, Georgi Chorbadzhiyski scribbled:
>> Around 01/25/11 13:52, Georgi Chorbadzhiyski scribbled:
>>> See the attached patch. It is generated on top of
>>> "[PATCH] Replace defines in libavformat/mpegtsenc.c with AVOptions"
>> Now with correct comment.
>
> Third time, now working (promise :) That'll teach me to not edit
> patches after testing them.
>
> --
> Georgi Chorbadzhiyski
> http://georgi.unixsol.org/
>
> From 2e09acd10aa18376d6ee837cfd5ecea25ab660b5 Mon Sep 17 00:00:00 2001
> From: Georgi Chorbadzhiyski <gf at unixsol.org>
> Date: Tue, 25 Jan 2011 13:45:25 +0200
> Subject: [PATCH 3/3] 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.
> ---
> ?libavformat/mpegtsenc.c | ? ?6 +++++-
> ?1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index fc3736a..8220fcb 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -157,6 +157,10 @@ static int mpegts_write_section1(MpegTSSection *s, int tid, int id,
> ?{
> ? ? uint8_t section[1024], *q;
> ? ? unsigned int tot_len;
> + ? ?unsigned int flags = 0xb000;
> +
> + ? ?if (tid == SDT_TID)
> + ? ? ? ?flags |= 0xe000; /* reserved_future_use must be set to 1 */

unsigned int flags = tid == SDT_TID ? 0xe000 : 0xb000;

OK with that changed.

Ronald



More information about the ffmpeg-devel mailing list