]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Add CODEC_ID_MOV_TEXT and use it instead of modifying the stream in the mov demuxer.
authorreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 27 Jan 2008 19:57:04 +0000 (19:57 +0000)
committerreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 27 Jan 2008 19:57:04 +0000 (19:57 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11638 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/avcodec.h
libavformat/isom.c
libavformat/mov.c

index f8c81783aad5352e2fd42ef25771fe7791fb155f..77f42efaf0cc93f9921adb69b3a37395a42876a5 100644 (file)
@@ -283,6 +283,7 @@ enum CodecID {
     CODEC_ID_TEXT,  ///< raw UTF-8 text
     CODEC_ID_XSUB,
     CODEC_ID_SSA,
+    CODEC_ID_MOV_TEXT,
 
     /* other specific kind of codecs (generaly used for attachments) */
     CODEC_ID_TTF= 0x18000,
index c0af2d2bbe9387091c4d68bd6643d07d0596099b..5a67aec8ea27460b34eebafc7e640a4bb60fb8fd 100644 (file)
@@ -169,7 +169,7 @@ const AVCodecTag codec_movaudio_tags[] = {
 };
 
 const AVCodecTag ff_codec_movsubtitle_tags[] = {
-    { CODEC_ID_TEXT, MKTAG('t', 'e', 'x', 't') },
+    { CODEC_ID_MOV_TEXT, MKTAG('t', 'e', 'x', 't') },
     { CODEC_ID_NONE, 0 },
 };
 
index cc3dc702111f7e8d35cbe189ddd238d4fad896c2..f39d9a227f1e5f54257afc767ff5c9847de5831c 100644 (file)
@@ -1543,12 +1543,6 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
     } else {
 #endif
         av_get_packet(s->pb, pkt, sample->size);
-        if (s->streams[sc->ffindex]->codec->codec_id == CODEC_ID_TEXT) {
-            int textlen = FFMIN(AV_RB16(pkt->data), sample->size - 2);
-            textlen = FFMAX(textlen, 0);
-            memmove(pkt->data, pkt->data + 2, textlen);
-            pkt->size = textlen;
-        }
 #ifdef CONFIG_DV_DEMUXER
         if (mov->dv_demux) {
             void *pkt_destruct_func = pkt->destruct;