summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorGildas Bazin <gbazi@altern.org>2004-02-14 16:25:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-14 16:25:32 +0000
commitac9fe33d0ee55372b75fbae93d2954cff9974bf0 (patch)
treeb62cef6c29c15c31310b091d74248a7cc333f8d6 /libavformat/aviobuf.c
parentd4c3c5a6f6658732b2b6e569cd243df4ec409f87 (diff)
avio patch by (Gildas Bazin <gbazin at altern dot org>)
Originally committed as revision 2783 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 12760a857e..de140966c6 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -429,7 +429,7 @@ int url_fdopen(ByteIOContext *s, URLContext *h)
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_fget_max_packet_size(ByteIOContext *s)
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 */