Mercurial > libavformat.hg
diff aviobuf.c @ 364:0d74e8abcb3d libavformat
avio patch by (Gildas Bazin <gbazin at altern dot org>)
author | michael |
---|---|
date | Sat, 14 Feb 2004 16:25:32 +0000 |
parents | a313e1080322 |
children | e14fcd57ad2f |
line wrap: on
line diff
--- a/aviobuf.c Wed Feb 11 02:28:34 2004 +0000 +++ b/aviobuf.c Sat Feb 14 16:25:32 2004 +0000 @@ -429,7 +429,7 @@ return -ENOMEM; if (init_put_byte(s, buffer, buffer_size, - (h->flags & URL_WRONLY) != 0, h, + (h->flags & URL_WRONLY || h->flags & URL_RDWR), h, url_read_packet, url_write_packet, url_seek_packet) < 0) { av_free(buffer); return -EIO; @@ -547,7 +547,8 @@ int url_open_buf(ByteIOContext *s, uint8_t *buf, int buf_size, int flags) { return init_put_byte(s, buf, buf_size, - (flags & URL_WRONLY) != 0, NULL, NULL, NULL, NULL); + (flags & URL_WRONLY || flags & URL_RDWR), + NULL, NULL, NULL, NULL); } /* return the written or read size */