[FFmpeg-devel] [PATCH 2/3] avformat: Support s337m in mxf/wav/w64

Tomas Härdin tjoppen at acc.umu.se
Tue Jul 30 22:04:24 EEST 2019


tis 2019-07-30 klockan 15:24 +0200 skrev Carl Eugen Hoyos:
> 
> 
> > Am 30.07.2019 um 14:02 schrieb Tomas Härdin <tjoppen at acc.umu.se>:
> > 
> > fre 2019-07-26 klockan 18:45 +0200 skrev Nicolas Gaullier:
> > 
> > > diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
> > > index 52194f54ef..501c21f220 100644
> > > --- a/libavformat/wavdec.c
> > > +++ b/libavformat/wavdec.c
> > > @@ -41,6 +41,7 @@
> > > #include "riff.h"
> > > #include "w64.h"
> > > #include "spdif.h"
> > > +#include "s337m.h"
> > > 
> > > typedef struct WAVDemuxContext {
> > >     const AVClass *class;
> > > @@ -593,6 +594,8 @@ break_loop:
> > >     } else if (st->codecpar->codec_id == AV_CODEC_ID_ADPCM_MS &&
> > > st-
> > > > codecpar->channels > 2) {
> > >         st->codecpar->block_align *= st->codecpar->channels;
> > >     }
> > > +    if (s->dolby_e_probe)
> > > +        s337m_probe_stream(s, &st);
> > 
> > The same goes here - these codecs should have corresponding TwoCCs.
> 
> There is definitely no TwoCCs for these kind of files, same as for
> DTS and AC-3. (I don't know about Dolby E in mxf.)

MXF has a UL registered for Dolby-E:
urn:smpte:ul:060e2b34.04010101.04020202.03021c00
We should continue to reject files that don't use it

> A probe function is definitely needed, it maybe should be more
> similar to existing lavfi probe functions though.

It's easy enough to probe this in .wav since it only involved reading a
few bytes from the data chunk, even if a proper TwoCC would be highly
preferable.

Both these situation could be handled by avformat_find_stream_info() if
there's some way to detect that a file is using AES3 in advance, and
delay setting codec_id until the first audio packet has been inspected

/Tomas



More information about the ffmpeg-devel mailing list