changeset 6174:563496476a23 libavformat

avienc : Avoid creating invalid AVI files when muxing subtitle streams other than XSUB.
author jai_menon
date Fri, 25 Jun 2010 04:29:02 +0000
parents 1b9079c05f9a
children 0e737c9247fd
files avienc.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/avienc.c	Fri Jun 25 01:19:03 2010 +0000
+++ b/avienc.c	Fri Jun 25 04:29:02 2010 +0000
@@ -225,7 +225,10 @@
         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;