Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 07/15] avformat/matroskaenc: Remove unnecessary check
Date: Tue,  8 Aug 2023 18:40:28 +0200
Message-ID: <AS8P250MB0744D904CFC9362DED687BE78F0DA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB0744E8BE1C2515319ABA75A08F0FA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

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 --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;
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2023-08-08 16:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 23:04 [FFmpeg-devel] [PATCH 1/5] avformat/matroskaenc: Support rotations Andreas Rheinhardt
2023-08-06 23:06 ` [FFmpeg-devel] [PATCH 2/5] avformat/matroskaenc: Don't reserve unnecessarily many EBML elements Andreas Rheinhardt
2023-08-06 23:06 ` [FFmpeg-devel] [PATCH 3/5] fate/matroska: Add ALAC remux test Andreas Rheinhardt
2023-08-06 23:06 ` [FFmpeg-devel] [PATCH 4/5] avformat/matroskaenc: Don't pretend to support unsupported codecs Andreas Rheinhardt
2023-08-06 23:06 ` [FFmpeg-devel] [PATCH 5/5] avformat/matroskaenc: Don't pretend to be able to mux RV30 Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 06/15] avformat/matroskaenc: Hoist check out of loop Andreas Rheinhardt
2023-08-10  7:48   ` Andreas Rheinhardt
2023-08-08 16:40 ` Andreas Rheinhardt [this message]
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 08/15] avformat/matroskaenc: Use proper AVIOContext Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 09/15] avformat/matroskaenc: Use dedicated pointer for accesses Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 10/15] avformat/matroskaenc: Avoid allocations when writing Dynamic HDR10+ Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 11/15] avformat/dovi_isom: Don't use AVFormatContext* for logctx Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 12/15] avformat/matroskaenc: Add const where appropriate Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 13/15] avformat/matroskaenc: Don't reserve space for HDR10+ when unnecessary Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 14/15] avformat/matroskaenc: Reindent after the previous commit Andreas Rheinhardt
2023-08-08 16:40 ` [FFmpeg-devel] [PATCH 15/15] avformat/matroskaenc: Don't write \0 unnecessarily Andreas Rheinhardt
2023-08-09  9:26 ` [FFmpeg-devel] [PATCH 1/5] avformat/matroskaenc: Support rotations Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS8P250MB0744D904CFC9362DED687BE78F0DA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git