Skip to content

Commit

Permalink
IVTV subtitle support
Browse files Browse the repository at this point in the history
The packet starts 'IVT0' or 'ivt0' see https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp for more details.
'I' = 0x49, 'i' = 0x69
  • Loading branch information
ulmus-scott authored and bennettpeter committed Dec 3, 2021
1 parent 9fa7dd5 commit f51e782
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mythtv/external/FFmpeg/libavcodec/codec_id.h
Expand Up @@ -548,6 +548,11 @@ enum AVCodecID {
AV_CODEC_ID_TTML,
AV_CODEC_ID_ARIB_CAPTION,

/* MythTV */
/* teletext codecs */
AV_CODEC_ID_MPEG2VBI,
AV_CODEC_ID_DVB_VBI,

/* other specific kind of codecs (generally used for attachments) */
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
AV_CODEC_ID_TTF = 0x18000,
Expand Down
3 changes: 3 additions & 0 deletions mythtv/external/FFmpeg/libavformat/mpeg.c
Expand Up @@ -603,6 +603,9 @@ static int mpegps_read_packet(AVFormatContext *s,
} else if (startcode >= 0x20 && startcode <= 0x3f) {
type = AVMEDIA_TYPE_SUBTITLE;
codec_id = AV_CODEC_ID_DVD_SUBTITLE;
} else if (startcode == 0x69 || startcode == 0x49) {
type = AVMEDIA_TYPE_DATA;
codec_id = AV_CODEC_ID_MPEG2VBI;
} else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
type = AVMEDIA_TYPE_VIDEO;
codec_id = AV_CODEC_ID_VC1;
Expand Down

0 comments on commit f51e782

Please sign in to comment.