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

matroskaenc: make sure we don't produce invalid file with no codec ID

Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
This commit is contained in:
Aurelien Jacobs 2011-03-24 01:56:26 +01:00
parent 75f4d1fadf
commit 00dc0206cb

View File

@ -630,6 +630,10 @@ static int mkv_write_tracks(AVFormatContext *s)
case AVMEDIA_TYPE_SUBTITLE:
put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_SUBTITLE);
if (!native_id) {
av_log(s, AV_LOG_ERROR, "Subtitle codec %d is not supported.\n", codec->codec_id);
return AVERROR_NOTSUPP;
}
break;
default:
av_log(s, AV_LOG_ERROR, "Only audio, video, and subtitles are supported for Matroska.\n");