[Libav-user] ff_codec_wav_tags has duplicate tags

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Libav-user] ff_codec_wav_tags has duplicate tags

坎

Hi,

         When I tried to play a ogg file with audio formats as pcm_u8it 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?

 

 

Best Regards.

Yeoman


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ff_codec_wav_tags has duplicate tags

Hendrik Leppkes
On Mon, Apr 17, 2017 at 4:37 AM, 坎 <[hidden email]> 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
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Loading...