[FFmpeg-devel] [PATCH] Properly store sampling rate for FLAC in mp4
Michael Niedermayer
michael at niedermayer.cc
Thu Oct 26 03:02:39 EEST 2017
On Wed, Oct 25, 2017 at 06:48:06PM -0400, Ronald S. Bultje wrote:
> Hi,
>
> On Wed, Oct 25, 2017 at 5:57 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
> wrote:
>
> > 2017-10-25 16:52 GMT+02:00 Jean-Yves Avenard <jyavenard at gmail.com>:
> > > hi
> > >
> > > On 26 August 2017 at 12:08, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> > >> 2017-08-25 13:25 GMT+02:00 Jean-Yves Avenard <jyavenard at gmail.com>:
> > >>
> > >>> + if (track->par->codec_id == AV_CODEC_ID_FLAC) {
> > >>
> > >> Why does this only apply to flac?
> > >>
> > >
> > > Sorry, I had missed your reply.
> > >
> > > The specification on how sampling rate is to be stored should it be
> > > greater than INT16_MAX is a FLAC in ISOBMFF requirement:
> > >
> > > https://git.xiph.org/?p=flac.git;a=blob;f=doc/isoflac.txt;h=
> > 574df9f54a779fca2e62c726703fc7be199d4c05;hb=refs/heads/master#l165
> > >
> > > It definitely could be applied to other codecs, but I haven't seen
> > > such requirements clearly defined.
> > >
> > > ISOBMFF only defines that AudioSampleEntryV1 should be used instead,
> > > in which case the sampling_rate is a 32 bits integer (ISO 14496-12
> > > 12.2.3.2)
> >
> > Not sure I understand:
> > In ticket #6609, I asked if this is a flac-only issue.
> > You answered: "The issue can be reproduced with any codec."
> >
> > So why does your patch only fix the issue for flac?
> > Or do I misunderstand?
> >
>
> The extension for storing values greater than int16_max is only part of the
> isobmff-flac spec, it's not generalized for other audio codecs. Using it
> for other audio codecs may have unwanted results, which is why it's
> flac-specific.
>
> Do you want a comment in the source code to make this easier to understand
> for future developers staring at this code?
the question wasnt intended for me, but yes
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171026/dfd5ba57/attachment.sig>
More information about the ffmpeg-devel
mailing list