comparison avienc.c @ 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 11bb10c37225
children
comparison
equal deleted inserted replaced
6173:1b9079c05f9a 6174:563496476a23
223 strh = ff_start_tag(pb, "strh"); 223 strh = ff_start_tag(pb, "strh");
224 switch(stream->codec_type) { 224 switch(stream->codec_type) {
225 case AVMEDIA_TYPE_SUBTITLE: 225 case AVMEDIA_TYPE_SUBTITLE:
226 // XSUB subtitles behave like video tracks, other subtitles 226 // XSUB subtitles behave like video tracks, other subtitles
227 // are not (yet) supported. 227 // are not (yet) supported.
228 if (stream->codec_id != CODEC_ID_XSUB) break; 228 if (stream->codec_id != CODEC_ID_XSUB) {
229 av_log(s, AV_LOG_ERROR, "Subtitle streams other than DivX XSUB are not supported by the AVI muxer.\n");
230 return AVERROR_PATCHWELCOME;
231 }
229 case AVMEDIA_TYPE_VIDEO: put_tag(pb, "vids"); break; 232 case AVMEDIA_TYPE_VIDEO: put_tag(pb, "vids"); break;
230 case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break; 233 case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break;
231 // case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break; 234 // case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break;
232 case AVMEDIA_TYPE_DATA : put_tag(pb, "dats"); break; 235 case AVMEDIA_TYPE_DATA : put_tag(pb, "dats"); break;
233 } 236 }