summaryrefslogtreecommitdiff
path: root/libavformat/wtvdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-08-27 22:08:56 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-08-31 19:58:09 +0200
commitdddd006cabcead012ad88a0ec027578cd2963031 (patch)
tree3b81db814298cfffebfe824644ef37b25718e895 /libavformat/wtvdec.c
parent54ca7e39dae120fefe96d30e965a304b63a1b491 (diff)
downloadffmpeg-dddd006cabcead012ad88a0ec027578cd2963031.tar.gz
wtvdec: set correct codec ID for CC streams.
Closed caption data is definitely not teletext. Since it contains a EIA-608 compatibility stream, the EIA_608 codec ID is at least not completely wrong. Fixes subtitle playback in MPlayer with the sample in trac ticket #1482. To fix the ticket itself I expect FFmpeg will need a closed-caption to SRT decoder first. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r--libavformat/wtvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 2999382ee4..28de7873e1 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -695,7 +695,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
if (ff_guidcmp(formattype, ff_format_none))
av_log(s, AV_LOG_WARNING, "unknown formattype:"FF_PRI_GUID"\n", FF_ARG_GUID(formattype));
avio_skip(pb, size);
- st->codec->codec_id = AV_CODEC_ID_DVB_TELETEXT;
+ st->codec->codec_id = !ff_guidcmp(subtype, mediasubtype_teletext) ? AV_CODEC_ID_DVB_TELETEXT : AV_CODEC_ID_EIA_608;
return st;
} else if (!ff_guidcmp(mediatype, mediatype_mpeg2_sections) &&
!ff_guidcmp(subtype, mediasubtype_mpeg2_sections)) {