add subtitle codec autodetection

Originally committed as revision 25884 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs
2010-12-04 14:46:13 +00:00
parent 1c3b408f88
commit 118ccae030
2 changed files with 10 additions and 1 deletions

View File

@@ -274,6 +274,8 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
return codec_id;
}else if(type == AVMEDIA_TYPE_AUDIO)
return fmt->audio_codec;
else if (type == AVMEDIA_TYPE_SUBTITLE)
return fmt->subtitle_codec;
else
return CODEC_ID_NONE;
}