1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Jai Menon 2010-06-25 04:29:02 +00:00
parent 03ac56e7f1
commit d6a9349062

View File

@ -225,7 +225,10 @@ static int avi_write_header(AVFormatContext *s)
case AVMEDIA_TYPE_SUBTITLE: case AVMEDIA_TYPE_SUBTITLE:
// XSUB subtitles behave like video tracks, other subtitles // XSUB subtitles behave like video tracks, other subtitles
// are not (yet) supported. // 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_VIDEO: put_tag(pb, "vids"); break;
case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break; case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break;
// case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break; // case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break;