[Libav-user] ff_codec_wav_tags has duplicate tags

Hendrik Leppkes h.leppkes at gmail.com
Wed Apr 19 00:01:48 EEST 2017


On Mon, Apr 17, 2017 at 4:37 AM, 坎 <xin_wu_hen at qq.com> wrote:
> Hi,
>
>          When I tried to play a ogg file with audio formats as pcm_u8,it
> turned out to be pcm_s16le. By tracking the avformat_open_input, I got this:
>
> st->codecpar->codec_id = ff_codec_get_id(ff_codec_wav_tags,...)
>
> while, ff_codec_wav_tags as follows:
>
> ff_codec_wav_tags[] = {
>
>     { AV_CODEC_ID_PCM_S16LE,       0x0001 },
>
>     /* must come after s16le in this list */
>
>     { AV_CODEC_ID_PCM_U8,          0x0001 },
>
>     { AV_CODEC_ID_PCM_S24LE,       0x0001 },
>
>     { AV_CODEC_ID_PCM_S32LE,       0x0001 },
>
>     { AV_CODEC_ID_PCM_S64LE,       0x0001 },
>
>    When tags is 0x0001, AV_CODEC_ID_PCM_S16LE is always returned. Should
> they have different tags?
>
>

0x0001 is the generic WAV tag for all integer PCM codecs, the actual
format is identified by a bitdepth element in the header.

- Hendrik


More information about the Libav-user mailing list