[FFmpeg-devel] [PATCH] libavformat/riff.c: Adding support of PCM_S24LE in WAVEFORMATEXTENSIBLE

Hendrik Leppkes h.leppkes at gmail.com
Fri Oct 23 00:31:23 CEST 2015


On Thu, Oct 22, 2015 at 11:48 PM, Thierry Foucu <tfoucu at gmail.com> wrote:
> On Thu, Oct 22, 2015 at 2:29 PM, Hendrik Leppkes <h.leppkes at gmail.com>
> wrote:
>
>> On Thu, Oct 22, 2015 at 11:15 PM, Thierry Foucu <tfoucu at gmail.com> wrote:
>> > On Thu, Oct 22, 2015 at 2:08 PM, Hendrik Leppkes <h.leppkes at gmail.com>
>> > wrote:
>> >
>> >> On Thu, Oct 22, 2015 at 9:19 PM, Thierry Foucu <tfoucu at gmail.com>
>> wrote:
>> >> > ---
>> >> >  libavformat/riff.c | 1 +
>> >> >  1 file changed, 1 insertion(+)
>> >> >
>> >> > diff --git a/libavformat/riff.c b/libavformat/riff.c
>> >> > index a9197e7..7de8936 100644
>> >> > --- a/libavformat/riff.c
>> >> > +++ b/libavformat/riff.c
>> >> > @@ -487,5 +487,6 @@ const AVCodecGuid ff_codec_wav_guids[] = {
>> >> >      { AV_CODEC_ID_ATRAC3P,  { 0xBF, 0xAA, 0x23, 0xE9, 0x58, 0xCB,
>> 0x71,
>> >> 0x44, 0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62 } },
>> >> >      { AV_CODEC_ID_EAC3,     { 0xAF, 0x87, 0xFB, 0xA7, 0x02, 0x2D,
>> 0xFB,
>> >> 0x42, 0xA4, 0xD4, 0x05, 0xCD, 0x93, 0x84, 0x3B, 0xDD } },
>> >> >      { AV_CODEC_ID_MP2,      { 0x2B, 0x80, 0x6D, 0xE0, 0x46, 0xDB,
>> 0xCF,
>> >> 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
>> >> > +    { AV_CODEC_ID_PCM_S24LE,{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
>> 0x00,
>> >> 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA } },
>> >> >      { AV_CODEC_ID_NONE }
>> >> >  };
>> >> > --
>> >>
>> >> This is the generic PCM GUID, isn't it? It could be any PCM bitdepth,
>> >> so the patch does not appear correct to me.
>> >>
>> >
>> > Should i then look for the generic PCM GUID (to decide this is a PCM
>> codec)
>> > and base on the bits_per_coded_sample, selects the PCM codec?
>> >
>> >
>>
>> From what I can tell such files should already be handled by the
>> generic WAVEFORMATEXTENSIBLE handler.
>> Can you share a file which doesn't work as expected?
>>
>>
> No pb. just uploaded to the ftp a file name
> raw_video_pcm_s24le.avi
>

That tool sure is writing weird broken files.
The usual base GUID is {xxxxxxxx-0000-0010-8000-00AA00389B71}

This thing writes {xxxxxxxx-0000-0000-0000-1000800000aa} and then has
8 bytes of extradata which contain the remainder of the GUID (and 4
zeros)
It  seems like they screwed something up and shifted the proper GUID
by 4 bytes after the expected field.

Does any software play this PCM track?

- Hendrik


More information about the ffmpeg-devel mailing list