mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
matroskaenc: make sure we don't produce invalid file with no codec ID
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
9c569ef712
commit
89d4c13057
@ -614,6 +614,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(ENOSYS);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
av_log(s, AV_LOG_ERROR, "Only audio, video, and subtitles are supported for Matroska.\n");
|
||||
|
Loading…
Reference in New Issue
Block a user