changeset 2315:f93b242dde21 libavformat

Hack to support XSUB subtitles in AVI
author reimar
date Sun, 05 Aug 2007 12:11:16 +0000
parents 85ed1e2ce41e
children 5a4914f78109
files avidec.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avidec.c	Sun Aug 05 05:56:34 2007 +0000
+++ b/avidec.c	Sun Aug 05 12:11:16 2007 +0000
@@ -412,6 +412,13 @@
                     get_le32(pb); /* ClrUsed */
                     get_le32(pb); /* ClrImportant */
 
+                    if (tag1 == MKTAG('D', 'X', 'S', 'B')) {
+                        st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+                        st->codec->codec_tag = tag1;
+                        st->codec->codec_id = CODEC_ID_XSUB;
+                        break;
+                    }
+
                     if(size > 10*4 && size<(1<<30)){
                         st->codec->extradata_size= size - 10*4;
                         st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);