[FFmpeg-cvslog] r23766 - trunk/libavformat/avienc.c

jai_menon subversion
Fri Jun 25 06:29:03 CEST 2010


Author: jai_menon
Date: Fri Jun 25 06:29:02 2010
New Revision: 23766

Log:
avienc : Avoid creating invalid AVI files when muxing subtitle streams 
other than XSUB.

Modified:
   trunk/libavformat/avienc.c

Modified: trunk/libavformat/avienc.c
==============================================================================
--- trunk/libavformat/avienc.c	Fri Jun 25 06:23:45 2010	(r23765)
+++ trunk/libavformat/avienc.c	Fri Jun 25 06:29:02 2010	(r23766)
@@ -225,7 +225,10 @@ static int avi_write_header(AVFormatCont
         case AVMEDIA_TYPE_SUBTITLE:
             // XSUB subtitles behave like video tracks, other subtitles
             // are not (yet) supported.
-            if (stream->codec_id != CODEC_ID_XSUB) break;
+            if (stream->codec_id != CODEC_ID_XSUB) {
+                av_log(s, AV_LOG_ERROR, "Subtitle streams other than DivX XSUB are not supported by the AVI muxer.\n");
+                return AVERROR_PATCHWELCOME;
+            }
         case AVMEDIA_TYPE_VIDEO: put_tag(pb, "vids"); break;
         case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break;
 //        case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break;



More information about the ffmpeg-cvslog mailing list