aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-01-26 20:30:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-01-26 20:30:03 +0000
commit1e3c9307e628063811a9c8a0417854a6f73f8252 (patch)
tree5b093f42ee7b411f0739ed7ccfe25f1fa82142f4 /libavformat/mov.c
parent41e19673ef73c9ee7907bc8bfaffbb69c54eb9c1 (diff)
downloadffmpeg-1e3c9307e628063811a9c8a0417854a6f73f8252.tar.gz
Set correct codec type and id for text subtitles.
fixes http://samples.mplayerhq.hu/mov/subtitles-embedded/subtitlemovie.mov closes issue341 Originally committed as revision 11624 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2b09c78a8e..7542a01adc 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -624,6 +624,11 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
id = codec_get_id(codec_bmp_tags, format);
if (id > 0)
st->codec->codec_type = CODEC_TYPE_VIDEO;
+ else if(st->codec->codec_type == CODEC_TYPE_DATA){
+ id = codec_get_id(ff_codec_movsubtitle_tags, format);
+ if(id > 0)
+ st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+ }
}
dprintf(c->fc, "size=%d 4CC= %c%c%c%c codec_type=%d\n", size,