[FFmpeg-devel] [PATCH]Support more Atrac3-in-mkv samples

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Feb 10 14:47:22 CET 2013


Paul B Mahol <onemda <at> gmail.com> writes:

> > -    } else if (avctx->extradata_size == 10) {
> > +    } else if (avctx->extradata_size == 12 ||
> > +               avctx->extradata_size == 10) {
> >          /* Parse the extradata, RM format. */
> >          version                = bytestream_get_be32(&edata_ptr);
> >          samples_per_frame      = bytestream_get_be16(&edata_ptr);
> 
> What extra 2 bytes have? The matroska spec mentions 2 version of
> headers and matroska demuxer  skips first 22 bytes.

It actually skips (all) 78 bytes and uses the data 
after the matroska real audio property as extradata 
to be used by the decoder.
(Unrelated to this patch: It implicitely assumes a 
version 5 property header, could this be exploitable?)

It don't see how the needed extradata can be produced 
from the specified matroska structure (I did not find 
any of version, samples_per_frame and delay as read in 
the atrac3 decoder), and in my tests mkvmerge always 
writes those extra (undefined?) bytes.

There may be a problem with ra_288 in matroska: A test 
file only played with audible artefacts here, I don't 
know if the bug is in mkvmerge or FFmpeg. (How to test?)

> LGTM anyway.

Patch applied.

Thank you, Carl Eugen



More information about the ffmpeg-devel mailing list