[FFmpeg-devel] [PATCH v2 5/8] avformat/wavdec: s337m support

Gaullier Nicolas nicolas.gaullier at cji.paris
Thu Jan 16 12:30:07 EET 2020


>> >> Add s337m probing/reading similarly to spdif.
>> >> ---
>> >>  libavformat/wavdec.c | 23 +++++++++++++++++++----
>> >>  1 file changed, 19 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 
>> >> 575c667452..d030ed9f9d 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;
>> >> @@ -55,15 +56,17 @@ typedef struct WAVDemuxContext {
>> >>      int audio_eof;
>> >>      int ignore_length;
>> >>      int spdif;
>> >> +    int s337m;
>> >>      int smv_cur_pt;
>> >>      int smv_given_first;
>> >>      int unaligned; // e.g. if an odd number of bytes ID3 tag was prepended
>> >>      int rifx; // RIFX: integer byte order for parameters is big 
>> >> endian  } WAVDemuxContext;
>> >>
>> >> -static void set_spdif(AVFormatContext *s, WAVDemuxContext *wav)
>> >> +static void set_spdif_s337m(AVFormatContext *s, WAVDemuxContext 
>> >> +*wav)
>> >>  {
>> >> -    if (CONFIG_SPDIF_DEMUXER && s->streams[0]->codecpar->codec_tag == 1) {
>> >> +    AVCodecParameters *par = s->streams[0]->codecpar;
>> >> +    if ((CONFIG_SPDIF_DEMUXER || CONFIG_S337M_DEMUXER) &&
>> >> + par->codec_tag == 1) {
>> >
>> >Did you test this with both "--disable-everything --enable-demuxer=spdif" and "--disable-everything --enable-demuxer=s337m"?
>> >Neither should fail compilation.
>> >
>> >Carl Eugen
>>
>> I just have tested both, and compilation is ok.
>
>Sorry, this should have been "--disable-everything --enable-demuxer=wav,spdif" and "--disable-everything --enable-demuxer=wav,s337m".
>
>Carl Eugen

Sorry, I missed that. I send a new patch.



More information about the ffmpeg-devel mailing list