Hi,

On Mon, Apr 18, 2011 at 3:03 AM, Anton Khirnov <an...@khirnov.net> 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.

> -    if (flags & AVIO_RDWR) {
> +    if (flags & AVIO_FLAG_READ_WRITE) {

E.g. this is wrong, it doesn't do what you think it does.

Ronald
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to