diff options
author | Jai Menon <jmenon86@gmail.com> | 2010-06-25 04:29:02 +0000 |
---|---|---|
committer | Jai Menon <jmenon86@gmail.com> | 2010-06-25 04:29:02 +0000 |
commit | d6a93490629007a789d8b7f956caeb978cebb7c4 (patch) | |
tree | 77e4da36aa7692194868f2bc0b812d3ea55d1395 | |
parent | 03ac56e7f14cf0aa27abd4ac382f794650ebf0f4 (diff) | |
download | ffmpeg-d6a93490629007a789d8b7f956caeb978cebb7c4.tar.gz |
avienc : Avoid creating invalid AVI files when muxing subtitle streams
other than XSUB.
Originally committed as revision 23766 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/avienc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c index b4a31ec54a..161fb1bfc7 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -225,7 +225,10 @@ static int avi_write_header(AVFormatContext *s) 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; |