[MPlayer-users] question about demux_ogg.c and audio format types
moritz at bunkus.org
Sat Jul 27 22:35:02 CEST 2002
Hi MPlayer developers,
a question about libmpdemux/demux_ogg.c, around line 502. The code I
buffer = '\0';
sh_a->format = sh_a->wf->wFormatTag = atoi(buffer);
This obviously works if the format is PCM (0x0001) but fails for any ID
bigger than (decimal) 10. Exmple: MP3 has 0x0055 which atoi would
convert into 55, although the correct decimal value is 85. AC3 (0x2000)
wouldn't even fit into the four-character subtype array.
Shouldn't the 'atoi(buffer)' read 'strtol(buffer, (char **)NULL, 16)'
(No, I won't create a patch for that - it's just one simple line with
one simple change :))
==> Ciao, Mosu (Moritz Bunkus)
More information about the MPlayer-users