diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2011-02-20 02:38:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-08 02:09:44 +0100 |
commit | a2fc93f7005ee97cf17a07caac0f07f0537e2f59 (patch) | |
tree | dc2fd978654c04feee05e3b8ae596769b912a5e7 /libavformat | |
parent | 70b5906315c2b1f85272d3c529d695371b8fda0c (diff) | |
download | ffmpeg-a2fc93f7005ee97cf17a07caac0f07f0537e2f59.tar.gz |
Flag DVB subtitles for the hard hearing appropriately using their component_type id.
This is based on the component_type definition in the DVB SI spec [1].
[1]: http://www.dvb.org/technology/standards/a038_DVB-SI_dEN300468v1.12.1.pdf
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 789936dbbda60990220b80769ed75702775ea0b2)
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegts.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 1b6f5e3e5d..3859068c94 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -935,7 +935,17 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type language[1] = get8(pp, desc_end); language[2] = get8(pp, desc_end); language[3] = 0; - get8(pp, desc_end); + /* hearing impaired subtitles detection */ + switch(get8(pp, desc_end)) { + case 0x20: /* DVB subtitles (for the hard of hearing) with no monitor aspect ratio criticality */ + case 0x21: /* DVB subtitles (for the hard of hearing) for display on 4:3 aspect ratio monitor */ + case 0x22: /* DVB subtitles (for the hard of hearing) for display on 16:9 aspect ratio monitor */ + case 0x23: /* DVB subtitles (for the hard of hearing) for display on 2.21:1 aspect ratio monitor */ + case 0x24: /* DVB subtitles (for the hard of hearing) for display on a high definition monitor */ + case 0x25: /* DVB subtitles (for the hard of hearing) with plano-stereoscopic disparity for display on a high definition monitor */ + st->disposition |= AV_DISPOSITION_HEARING_IMPAIRED; + break; + } if (st->codec->extradata) { if (st->codec->extradata_size == 4 && memcmp(st->codec->extradata, *pp, 4)) av_log_ask_for_sample(fc, "DVB sub with multiple IDs\n"); |