[FFmpeg-devel] [PATCH] lavf/mpegts: document DVB teletext PMT fields
Marton Balint
cus at passwd.hu
Sat Feb 18 02:00:10 EET 2017
On Fri, 17 Feb 2017, Josh de Kock wrote:
> Signed-off-by: Josh de Kock <josh at itanimul.li>
> ---
> libavformat/mpegts.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
> index 590abb0..bcf2118 100644
> --- a/libavformat/mpegts.c
> +++ b/libavformat/mpegts.c
> @@ -1718,6 +1718,11 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
> case 0x56: /* DVB teletext descriptor */
> {
> uint8_t *extradata = NULL;
> + /* 5 bytes per DVB teletext substream data:
> + * ISO_639_language_code (3 bytes),
> + * teletext_type (5 bits),
> + * teletext_magazine_number (3 bits),
> + * teletext_page_number (1 byte) */
ok.
> int language_count = desc_len / 5;
>
> if (desc_len > 0 && desc_len % 5 != 0)
> @@ -1745,6 +1750,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
> language[i * 4 + 3] = ',';
>
> memcpy(extradata, *pp, 2);
> + /* The page number which libzvbi will output is extradata[0] & 7 * 256 + extradata[1] */
I am not sure this is useful, because it is irrelevant here, also not
entirely true, e.g. magazine 0 means 8xx page.
> extradata += 2;
>
> *pp += 2;
Regards,
Marton
More information about the ffmpeg-devel
mailing list