diff mbox series

[FFmpeg-devel,07/15] avformat/matroskaenc: Remove unnecessary check

Message ID AS8P250MB0744D904CFC9362DED687BE78F0DA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit f49515b082b9074bdc21633ab10e17db5ddb9e85
Headers show
Series [FFmpeg-devel,1/5] avformat/matroskaenc: Support rotations | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 8, 2023, 4:40 p.m. UTC
It is only WebVTT which is special in WebM; hypothetical future
subtitle codecs in WebM will presumably use the ordinary code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/matroskaenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index d9bc31daee..9fd4cf2f6c 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1831,7 +1831,7 @@  static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
 
     if (IS_WEBM(mkv)) {
         const char *codec_id;
-        if (par->codec_type != AVMEDIA_TYPE_SUBTITLE) {
+        if (par->codec_id != AV_CODEC_ID_WEBVTT) {
             for (j = 0; ff_webm_codec_tags[j].id != AV_CODEC_ID_NONE; j++) {
                 if (ff_webm_codec_tags[j].id == par->codec_id) {
                     codec_id = ff_webm_codec_tags[j].str;
@@ -1839,7 +1839,7 @@  static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
                     break;
                 }
             }
-        } else if (par->codec_id == AV_CODEC_ID_WEBVTT) {
+        } else {
             if (st->disposition & AV_DISPOSITION_CAPTIONS) {
                 codec_id = "D_WEBVTT/CAPTIONS";
                 native_id = MATROSKA_TRACK_TYPE_SUBTITLE;