Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-07 04:18:17 +0400
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-08 00:11:21 +0400
commit5012c07336eff0e928afb57c6d38271e316c0a6c (patch)
tree59b26015dd83db4208d99ae0f50ece94fd84ef78 /libavformat/mov.c
parent50ec8a2acd4f7ad422c0883153b856e737adf973 (diff)
Support detecting and demuxing EIA-608 subtitles in mov.
The format is slightly proprietary. DVDs use a format of code byte (0x00, 0x01, 0xfe or 0xff), two data bytes MOV uses instead cdat/cdt2 atom, two data bytes Auto-detecting and supporting both in one decoder is trivial, so a single codec ID is used. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c32d22ea8c..b4ff1df2eb 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1222,7 +1222,9 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
id = ff_codec_get_id(ff_codec_bmp_tags, format);
if (id > 0)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- else if (st->codec->codec_type == AVMEDIA_TYPE_DATA){
+ else if (st->codec->codec_type == AVMEDIA_TYPE_DATA ||
+ (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE &&
+ st->codec->codec_id == CODEC_ID_NONE)){
id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
if (id > 0)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;