avformat/matroskaenc: Don't pretend to be able to mux RV30

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@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-08-07 00:38:34 +02:00
parent 4e43cdcd1a
commit 1df13b3891

View File

@ -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,