[FFmpeg-cvslog] r11638 - in trunk: libavcodec/avcodec.h libavformat/isom.c libavformat/mov.c

reimar subversion
Sun Jan 27 20:57:04 CET 2008


Author: reimar
Date: Sun Jan 27 20:57:04 2008
New Revision: 11638

Log:
Add CODEC_ID_MOV_TEXT and use it instead of modifying the stream in the mov demuxer.


Modified:
   trunk/libavcodec/avcodec.h
   trunk/libavformat/isom.c
   trunk/libavformat/mov.c

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	(original)
+++ trunk/libavcodec/avcodec.h	Sun Jan 27 20:57:04 2008
@@ -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,

Modified: trunk/libavformat/isom.c
==============================================================================
--- trunk/libavformat/isom.c	(original)
+++ trunk/libavformat/isom.c	Sun Jan 27 20:57:04 2008
@@ -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 },
 };
 

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Sun Jan 27 20:57:04 2008
@@ -1543,12 +1543,6 @@ static int mov_read_packet(AVFormatConte
     } 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;




More information about the ffmpeg-cvslog mailing list