Hi,

On Mon, Apr 18, 2011 at 5:20 PM, Stefano Sabatini
<[email protected]> wrote:
> On date Monday 2011-04-18 16:20:43 -0400, Ronald S. Bultje wrote:
>> On Mon, Apr 18, 2011 at 3:03 AM, Anton Khirnov <[email protected]> wrote:
>> > -#define AVIO_RDONLY 1  /**< read-only */
>> > -#define AVIO_WRONLY 2  /**< write-only */
>> > -#define AVIO_RDWR   4  /**< read-write */
>> > +#define AVIO_FLAG_READ  1                                      /**< 
>> > read-only */
>> > +#define AVIO_FLAG_WRITE 2                                      /**< 
>> > write-only */
>
>> > +#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)  /**< 
>> > read-write pseudo flag */
>>
>> Now note this is very dangerous: you CAN NOT use a&b anymore to check
>> for R/W. You HAVE TO use a&b == b.
>
> Maybe it's better just get rid of the AVIO_FLAG_READ_WRITE pseudo
> flag, it's still useful when doing:
>
> ffurl_open(..., AVIO_FLAG_READ_WRITE)
> in place of:
> ffurl_open(..., AVIO_FLAG_READ|AVIO_FLAG_WRITE)
>
> to save some chars, but i agree it's rather misleading when used like
> a flag.

I think the char-saving is always OK. Just make sure it's used
correctly everywhere.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to