Message ID | C5bKAonDxDU4MqiYozbxUapBHMSM3vJvActGAyi41HIiybEKF2CrE0_tohKYBTrJSt9cgbij9g1xm9VYXkLwDRNUmILlDOwE6PCUhp6xgA4=@protonmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avformat/matroska: Add support for A_ATRAC/AT1 | expand |
Context | Check | Description |
---|---|---|
yinshiyou/configure_loongarch64 | warning | Failed to apply patch |
On 3/6/23, asivery <asivery@protonmail.com> wrote: > Signed-off-by: asivery <asivery@protonmail.com> > --- > libavformat/matroska.c | 1 + > libavformat/matroskadec.c | 2 ++ > 2 files changed, 3 insertions(+) > where is this defined? > diff --git a/libavformat/matroska.c b/libavformat/matroska.c > index 90d94b65bf..37305a523c 100644 > --- a/libavformat/matroska.c > +++ b/libavformat/matroska.c > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, > {"A_REAL/COOK" , AV_CODEC_ID_COOK}, > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, > {"A_TTA1" , AV_CODEC_ID_TTA}, > {"A_VORBIS" , AV_CODEC_ID_VORBIS}, > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > index d582f566a2..0aa8e6f3b3 100644 > --- a/libavformat/matroskadec.c > +++ b/libavformat/matroskadec.c > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s) > track->audio.frame_size); > if (!track->audio.buf) > return AVERROR(ENOMEM); > + } else if (codec_id == AV_CODEC_ID_ATRAC1) { > + st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC > frame size */ > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { > ret = matroska_parse_flac(s, track, &extradata_offset); > if (ret < 0) > -- > 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". >
It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1 ------- Original Message ------- On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol <onemda@gmail.com> wrote: > On 3/6/23, asivery asivery@protonmail.com wrote: > > > Signed-off-by: asivery asivery@protonmail.com > > --- > > libavformat/matroska.c | 1 + > > libavformat/matroskadec.c | 2 ++ > > 2 files changed, 3 insertions(+) > > > where is this defined? > > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c > > index 90d94b65bf..37305a523c 100644 > > --- a/libavformat/matroska.c > > +++ b/libavformat/matroska.c > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, > > {"A_REAL/COOK" , AV_CODEC_ID_COOK}, > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, > > {"A_TTA1" , AV_CODEC_ID_TTA}, > > {"A_VORBIS" , AV_CODEC_ID_VORBIS}, > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > > index d582f566a2..0aa8e6f3b3 100644 > > --- a/libavformat/matroskadec.c > > +++ b/libavformat/matroskadec.c > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s) > > track->audio.frame_size); > > if (!track->audio.buf) > > return AVERROR(ENOMEM); > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) { > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC > > frame size */ > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { > > ret = matroska_parse_flac(s, track, &extradata_offset); > > if (ret < 0) > > -- > > 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". > > _______________________________________________ > 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".
I'd appreciate it if someone took a look at this. If there's anything I need to change to make this patch viable for merging, please let me know. Best regards, asivery ------- Original Message ------- On Monday, March 6th, 2023 at 7:51 PM, asivery <asivery@protonmail.com> wrote: > It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1 > > > ------- Original Message ------- > On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote: > > > > > On 3/6/23, asivery asivery@protonmail.com wrote: > > > > > Signed-off-by: asivery asivery@protonmail.com > > > --- > > > libavformat/matroska.c | 1 + > > > libavformat/matroskadec.c | 2 ++ > > > 2 files changed, 3 insertions(+) > > > > where is this defined? > > > > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c > > > index 90d94b65bf..37305a523c 100644 > > > --- a/libavformat/matroska.c > > > +++ b/libavformat/matroska.c > > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ > > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, > > > {"A_REAL/COOK" , AV_CODEC_ID_COOK}, > > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, > > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, > > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, > > > {"A_TTA1" , AV_CODEC_ID_TTA}, > > > {"A_VORBIS" , AV_CODEC_ID_VORBIS}, > > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > > > index d582f566a2..0aa8e6f3b3 100644 > > > --- a/libavformat/matroskadec.c > > > +++ b/libavformat/matroskadec.c > > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s) > > > track->audio.frame_size); > > > if (!track->audio.buf) > > > return AVERROR(ENOMEM); > > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) { > > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC > > > frame size */ > > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { > > > ret = matroska_parse_flac(s, track, &extradata_offset); > > > if (ret < 0) > > > -- > > > 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". > > > > _______________________________________________ > > 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".
Hello, apologies for bothering you all with this, but if anyone could take a look at this patch it would be great. The only other container that supports ATRAC1 is AEA, and it's not that good of a format since it has no magic number, and therefore is easily detected incorrectly. Thank you in advance. ------- Original Message ------- On Monday, April 17th, 2023 at 2:27 AM, asivery <asivery@protonmail.com> wrote: > I'd appreciate it if someone took a look at this. > If there's anything I need to change to make this patch viable for merging, please let me know. > > Best regards, > asivery > ------- Original Message ------- > On Monday, March 6th, 2023 at 7:51 PM, asivery asivery@protonmail.com wrote: > > > > > It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1 > > > > ------- Original Message ------- > > On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote: > > > > > On 3/6/23, asivery asivery@protonmail.com wrote: > > > > > > > Signed-off-by: asivery asivery@protonmail.com > > > > --- > > > > libavformat/matroska.c | 1 + > > > > libavformat/matroskadec.c | 2 ++ > > > > 2 files changed, 3 insertions(+) > > > > > > where is this defined? > > > > > > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c > > > > index 90d94b65bf..37305a523c 100644 > > > > --- a/libavformat/matroska.c > > > > +++ b/libavformat/matroska.c > > > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ > > > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, > > > > {"A_REAL/COOK" , AV_CODEC_ID_COOK}, > > > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, > > > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, > > > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, > > > > {"A_TTA1" , AV_CODEC_ID_TTA}, > > > > {"A_VORBIS" , AV_CODEC_ID_VORBIS}, > > > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > > > > index d582f566a2..0aa8e6f3b3 100644 > > > > --- a/libavformat/matroskadec.c > > > > +++ b/libavformat/matroskadec.c > > > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s) > > > > track->audio.frame_size); > > > > if (!track->audio.buf) > > > > return AVERROR(ENOMEM); > > > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) { > > > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC > > > > frame size */ > > > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { > > > > ret = matroska_parse_flac(s, track, &extradata_offset); > > > > if (ret < 0) > > > > -- > > > > 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". > > > > > > _______________________________________________ > > > 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".
asivery: > Hello, apologies for bothering you all with this, but if anyone could take a look at this patch it would be great. The only other container that supports ATRAC1 is AEA, and it's not that good of a format since it has no magic number, and therefore is easily detected incorrectly. > > Thank you in advance. Sorry for having missed this. I will look at it tomorrow. - Andreas > > ------- Original Message ------- > On Monday, April 17th, 2023 at 2:27 AM, asivery <asivery@protonmail.com> wrote: > > >> I'd appreciate it if someone took a look at this. >> If there's anything I need to change to make this patch viable for merging, please let me know. >> >> Best regards, >> asivery >> ------- Original Message ------- >> On Monday, March 6th, 2023 at 7:51 PM, asivery asivery@protonmail.com wrote: >> >> >> >>> It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1 >>> >>> ------- Original Message ------- >>> On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote: >>> >>>> On 3/6/23, asivery asivery@protonmail.com wrote: >>>> >>>>> Signed-off-by: asivery asivery@protonmail.com >>>>> --- >>>>> libavformat/matroska.c | 1 + >>>>> libavformat/matroskadec.c | 2 ++ >>>>> 2 files changed, 3 insertions(+) >>>> >>>> where is this defined? >>>> >>>>> diff --git a/libavformat/matroska.c b/libavformat/matroska.c >>>>> index 90d94b65bf..37305a523c 100644 >>>>> --- a/libavformat/matroska.c >>>>> +++ b/libavformat/matroska.c >>>>> @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ >>>>> {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, >>>>> {"A_REAL/COOK" , AV_CODEC_ID_COOK}, >>>>> {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, >>>>> + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, >>>>> {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, >>>>> {"A_TTA1" , AV_CODEC_ID_TTA}, >>>>> {"A_VORBIS" , AV_CODEC_ID_VORBIS}, >>>>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c >>>>> index d582f566a2..0aa8e6f3b3 100644 >>>>> --- a/libavformat/matroskadec.c >>>>> +++ b/libavformat/matroskadec.c >>>>> @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s) >>>>> track->audio.frame_size); >>>>> if (!track->audio.buf) >>>>> return AVERROR(ENOMEM); >>>>> + } else if (codec_id == AV_CODEC_ID_ATRAC1) { >>>>> + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC >>>>> frame size */ >>>>> } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { >>>>> ret = matroska_parse_flac(s, track, &extradata_offset); >>>>> if (ret < 0) >>>>> -- >>>>> 2.34.1
Hi, it's really not a problem. Thanks and please let me know if I need to change anything for this to be merged. ------- Original Message ------- On Saturday, June 17th, 2023 at 3:41 AM, Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote: > asivery: > > > Hello, apologies for bothering you all with this, but if anyone could take a look at this patch it would be great. The only other container that supports ATRAC1 is AEA, and it's not that good of a format since it has no magic number, and therefore is easily detected incorrectly. > > > > Thank you in advance. > > > Sorry for having missed this. I will look at it tomorrow. > > - Andreas > > > ------- Original Message ------- > > On Monday, April 17th, 2023 at 2:27 AM, asivery asivery@protonmail.com wrote: > > > > > I'd appreciate it if someone took a look at this. > > > If there's anything I need to change to make this patch viable for merging, please let me know. > > > > > > Best regards, > > > asivery > > > ------- Original Message ------- > > > On Monday, March 6th, 2023 at 7:51 PM, asivery asivery@protonmail.com wrote: > > > > > > > It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1 > > > > > > > > ------- Original Message ------- > > > > On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote: > > > > > > > > > On 3/6/23, asivery asivery@protonmail.com wrote: > > > > > > > > > > > Signed-off-by: asivery asivery@protonmail.com > > > > > > --- > > > > > > libavformat/matroska.c | 1 + > > > > > > libavformat/matroskadec.c | 2 ++ > > > > > > 2 files changed, 3 insertions(+) > > > > > > > > > > where is this defined? > > > > > > > > > > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c > > > > > > index 90d94b65bf..37305a523c 100644 > > > > > > --- a/libavformat/matroska.c > > > > > > +++ b/libavformat/matroska.c > > > > > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ > > > > > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, > > > > > > {"A_REAL/COOK" , AV_CODEC_ID_COOK}, > > > > > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, > > > > > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, > > > > > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, > > > > > > {"A_TTA1" , AV_CODEC_ID_TTA}, > > > > > > {"A_VORBIS" , AV_CODEC_ID_VORBIS}, > > > > > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > > > > > > index d582f566a2..0aa8e6f3b3 100644 > > > > > > --- a/libavformat/matroskadec.c > > > > > > +++ b/libavformat/matroskadec.c > > > > > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s) > > > > > > track->audio.frame_size); > > > > > > if (!track->audio.buf) > > > > > > return AVERROR(ENOMEM); > > > > > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) { > > > > > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC > > > > > > frame size */ > > > > > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { > > > > > > ret = matroska_parse_flac(s, track, &extradata_offset); > > > > > > if (ret < 0) > > > > > > -- > > > > > > 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".
asivery: > Signed-off-by: asivery <asivery@protonmail.com> > --- > libavformat/matroska.c | 1 + > libavformat/matroskadec.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c > index 90d94b65bf..37305a523c 100644 > --- a/libavformat/matroska.c > +++ b/libavformat/matroska.c > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, > {"A_REAL/COOK" , AV_CODEC_ID_COOK}, > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, > {"A_TTA1" , AV_CODEC_ID_TTA}, > {"A_VORBIS" , AV_CODEC_ID_VORBIS}, > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > index d582f566a2..0aa8e6f3b3 100644 > --- a/libavformat/matroskadec.c > +++ b/libavformat/matroskadec.c > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s) > track->audio.frame_size); > if (!track->audio.buf) > return AVERROR(ENOMEM); > + } else if (codec_id == AV_CODEC_ID_ATRAC1) { > + st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC frame size */ > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { > ret = matroska_parse_flac(s, track, &extradata_offset); > if (ret < 0) > -- > 2.34.1 This patch is broken. The indentation is off. - Andreas
Andreas Rheinhardt: > asivery: >> Signed-off-by: asivery <asivery@protonmail.com> >> --- >> libavformat/matroska.c | 1 + >> libavformat/matroskadec.c | 2 ++ >> 2 files changed, 3 insertions(+) >> >> diff --git a/libavformat/matroska.c b/libavformat/matroska.c >> index 90d94b65bf..37305a523c 100644 >> --- a/libavformat/matroska.c >> +++ b/libavformat/matroska.c >> @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ >> {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, >> {"A_REAL/COOK" , AV_CODEC_ID_COOK}, >> {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, >> + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, >> {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, >> {"A_TTA1" , AV_CODEC_ID_TTA}, >> {"A_VORBIS" , AV_CODEC_ID_VORBIS}, >> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c >> index d582f566a2..0aa8e6f3b3 100644 >> --- a/libavformat/matroskadec.c >> +++ b/libavformat/matroskadec.c >> @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s) >> track->audio.frame_size); >> if (!track->audio.buf) >> return AVERROR(ENOMEM); >> + } else if (codec_id == AV_CODEC_ID_ATRAC1) { >> + st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC frame size */ >> } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { >> ret = matroska_parse_flac(s, track, &extradata_offset); >> if (ret < 0) >> -- >> 2.34.1 > > This patch is broken. The indentation is off. > > - Andreas > Apart from this: The result of the multiplication may not fit into an int; looking at the other atrac1 code it seems that we only support mono and stereo files. Is this a limitation of FFmpeg or of the format? - Andreas
diff --git a/libavformat/matroska.c b/libavformat/matroska.c index 90d94b65bf..37305a523c 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={ {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3}, {"A_REAL/COOK" , AV_CODEC_ID_COOK}, {"A_REAL/SIPR" , AV_CODEC_ID_SIPR}, + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1}, {"A_TRUEHD" , AV_CODEC_ID_TRUEHD}, {"A_TTA1" , AV_CODEC_ID_TTA}, {"A_VORBIS" , AV_CODEC_ID_VORBIS}, diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index d582f566a2..0aa8e6f3b3 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s) track->audio.frame_size); if (!track->audio.buf) return AVERROR(ENOMEM); + } else if (codec_id == AV_CODEC_ID_ATRAC1) { + st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC frame size */ } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) { ret = matroska_parse_flac(s, track, &extradata_offset); if (ret < 0)
Signed-off-by: asivery <asivery@protonmail.com> --- libavformat/matroska.c | 1 + libavformat/matroskadec.c | 2 ++ 2 files changed, 3 insertions(+) -- 2.34.1