[vlc-devel] [RFC v2 1/2] audio: do not hardcode audio channel limits into the decoder/demuxer.

Emeric Grange emeric.grange at gmail.com
Wed Oct 28 14:01:05 CET 2015


2015-10-13 15:33 GMT+02:00 Emeric Grange <emeric.grange at gmail.com>:
> 2015-10-12 18:08 GMT+02:00 Jean-Baptiste Kempf <jb at videolan.org>:
>> On 12 Oct, Emeric Grange wrote :
>>>      {
>>> -        msg_Err( p_dec, "bad channels count (1-9): %i",
>>> -                 p_dec->fmt_in.audio.i_channels );
>>> +        msg_Err( p_dec, "bad channels count (1-%i): %i",
>>> +                 AOUT_CHAN_MAX, p_dec->fmt_in.audio.i_channels );
>>
>> You should be able to do it at compile time, no?
>>
>> Like:
>>         msg_Err( p_dec, "bad channels count (1-" AOUT_CHAN_MAX "): %i,

Hi,
Turns out we cannot do that, unless AOUT_CHAN_MAX value is a string,
set between quotes, which bring other problems obviously.
While it seems theoretically possible to use "#AOUT_CHAN_MAX" to
expand a macro inside a printf, my compiler didn't let me use that.

>
> Yes no problem I can do that, I'm just not used to do it that way.
>
> Emeric
>
>> --
>> Jean-Baptiste Kempf
>> http://www.jbkempf.com/ - +33 672 704 734
>> Sent from my Electronic Device
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list