[FFmpeg-devel] [PATCH 5/5] avformat/matroskaenc: Don't pretend to be able to mux RV30
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon Aug 7 02:06:27 EEST 2023
The demuxer uses a extradata offset of 26, so we would need
to recreate the missing 26 bytes somehow in the muxer, but
we just don't. Remuxed files (like real/rv30.rm from the FATE-suite)
don't work due to missing extradata.
(The extradata offset also applies to RV40 and the extradata
is indeed lost upon remuxing, yet remuxing real/spygames-2MB.rmvb
works; our RV40 decoder does not use extradata at all.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavformat/matroskaenc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a9b7f89f38..be70e7a6f1 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -3300,7 +3300,8 @@ static int mkv_init(struct AVFormatContext *s)
s->streams[i]->codecpar->codec_id == AV_CODEC_ID_RA_288 ||
s->streams[i]->codecpar->codec_id == AV_CODEC_ID_SIPR ||
s->streams[i]->codecpar->codec_id == AV_CODEC_ID_RV10 ||
- s->streams[i]->codecpar->codec_id == AV_CODEC_ID_RV20) {
+ s->streams[i]->codecpar->codec_id == AV_CODEC_ID_RV20 ||
+ s->streams[i]->codecpar->codec_id == AV_CODEC_ID_RV30) {
av_log(s, AV_LOG_ERROR,
"The Matroska muxer does not yet support muxing %s\n",
avcodec_get_name(s->streams[i]->codecpar->codec_id));
@@ -3430,11 +3431,6 @@ static const AVCodecTag additional_audio_tags[] = {
{ AV_CODEC_ID_NONE, 0xFFFFFFFF }
};
-static const AVCodecTag additional_video_tags[] = {
- { AV_CODEC_ID_RV30, 0xFFFFFFFF },
- { AV_CODEC_ID_NONE, 0xFFFFFFFF }
-};
-
static const AVCodecTag additional_subtitle_tags[] = {
{ AV_CODEC_ID_DVB_SUBTITLE, 0xFFFFFFFF },
{ AV_CODEC_ID_DVD_SUBTITLE, 0xFFFFFFFF },
@@ -3506,7 +3502,7 @@ const FFOutputFormat ff_matroska_muxer = {
AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
.p.codec_tag = (const AVCodecTag* const []){
ff_codec_bmp_tags, ff_codec_wav_tags,
- additional_audio_tags, additional_video_tags, additional_subtitle_tags, 0
+ additional_audio_tags, additional_subtitle_tags, 0
},
.p.subtitle_codec = AV_CODEC_ID_ASS,
.query_codec = mkv_query_codec,
--
2.34.1
More information about the ffmpeg-devel
mailing list