[FFmpeg-cvslog] r20414 - in trunk: libavcodec/avcodec.h libavformat/mpegts.c
cehoyos
subversion
Thu Oct 29 11:46:17 CET 2009
Author: cehoyos
Date: Thu Oct 29 11:46:16 2009
New Revision: 20414
Log:
Support demuxing teletext in DVB streams.
Original patch by Francesco Lavra, francescolavra interfree it
Modified:
trunk/libavcodec/avcodec.h
trunk/libavformat/mpegts.c
Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h Thu Oct 29 11:43:56 2009 (r20413)
+++ trunk/libavcodec/avcodec.h Thu Oct 29 11:46:16 2009 (r20414)
@@ -331,6 +331,7 @@ enum CodecID {
CODEC_ID_SSA,
CODEC_ID_MOV_TEXT,
CODEC_ID_HDMV_PGS_SUBTITLE,
+ CODEC_ID_DVB_TELETEXT,
/* other specific kind of codecs (generally used for attachments) */
CODEC_ID_TTF= 0x18000,
Modified: trunk/libavformat/mpegts.c
==============================================================================
--- trunk/libavformat/mpegts.c Thu Oct 29 11:43:56 2009 (r20413)
+++ trunk/libavformat/mpegts.c Thu Oct 29 11:46:16 2009 (r20414)
@@ -535,6 +535,7 @@ static const StreamType DESC_types[] = {
{ 0x6a, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */
{ 0x7a, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
{ 0x7b, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
+ { 0x56, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
{ 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
{ 0 },
};
@@ -729,6 +730,13 @@ static void pmt_cb(MpegTSFilter *filter,
mpegts_find_stream_type(st, desc_tag, DESC_types);
switch(desc_tag) {
+ case 0x56: /* DVB teletext descriptor */
+ language[0] = get8(&p, desc_end);
+ language[1] = get8(&p, desc_end);
+ language[2] = get8(&p, desc_end);
+ language[3] = 0;
+ av_metadata_set(&st->metadata, "language", language);
+ break;
case 0x59: /* subtitling descriptor */
language[0] = get8(&p, desc_end);
language[1] = get8(&p, desc_end);
More information about the ffmpeg-cvslog
mailing list