avformat/matroska: Add support for A_ATRAC/AT1

Signed-off-by: asivery <asivery@protonmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/7.0
asivery 11 months ago committed by Andreas Rheinhardt
parent 568645f087
commit 7f4abe7c37
  1. 1
      libavformat/matroska.c
  2. 8
      libavformat/matroskadec.c
  3. 1
      libavformat/matroskaenc.c

@ -28,6 +28,7 @@ const CodecTags ff_mkv_codec_tags[]={
{"A_AAC" , AV_CODEC_ID_AAC},
{"A_AC3" , AV_CODEC_ID_AC3},
{"A_ALAC" , AV_CODEC_ID_ALAC},
{"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
{"A_DTS" , AV_CODEC_ID_DTS},
{"A_EAC3" , AV_CODEC_ID_EAC3},
{"A_FLAC" , AV_CODEC_ID_FLAC},

@ -2779,6 +2779,14 @@ static int mka_parse_audio_codec(MatroskaTrack *track, AVCodecParameters *par,
return AVERROR(ENOMEM);
break;
}
case AV_CODEC_ID_ATRAC1:
/* ATRAC1 uses a constant frame size.
* Typical ATRAC1 streams are either mono or stereo.
* At most, ATRAC1 was used to store 8 channels of audio. */
if (track->audio.channels > 8)
return AVERROR_INVALIDDATA;
par->block_align = track->audio.channels * 212;
break;
case AV_CODEC_ID_FLAC:
if (track->codec_priv.size) {
ret = matroska_parse_flac(s, track, extradata_offset);

@ -3474,6 +3474,7 @@ static int mkv_check_bitstream(AVFormatContext *s, AVStream *st,
static const AVCodecTag additional_audio_tags[] = {
{ AV_CODEC_ID_ALAC, 0XFFFFFFFF },
{ AV_CODEC_ID_ATRAC1, 0xFFFFFFFF },
{ AV_CODEC_ID_MLP, 0xFFFFFFFF },
{ AV_CODEC_ID_OPUS, 0xFFFFFFFF },
{ AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },

Loading…
Cancel
Save