From 9c204df96092b369f6e4f5a8eb245ac4a6b5b2c0 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Fri, 7 May 2010 23:39:39 +0200 Subject: [PATCH] Fix segault --- libavformat/aviobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 8493e5532..865a76ad1 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -589,8 +589,7 @@ int url_fdopen(ByteIOContext **s, URLContext *h) } else { buffer_size = IO_BUFFER_SIZE; } - (*s)->o_direct_flag = !!(h->flags & URL_DIRECT); - if ((*s)->o_direct_flag) { + if (h->flags & URL_DIRECT) { buffer_size = 2*buffer_size+BLOCK_SIZE; buffer = memalign(sysconf(_SC_PAGESIZE), buffer_size); ; @@ -615,6 +614,7 @@ int url_fdopen(ByteIOContext **s, URLContext *h) } (*s)->is_streamed = h->is_streamed; (*s)->max_packet_size = max_packet_size; + (*s)->o_direct_flag = !!(h->flags & URL_DIRECT); if(h->prot) { (*s)->read_pause = (int (*)(void *, int))h->prot->url_read_pause; (*s)->read_seek = (int64_t (*)(void *, int, int64_t, int))h->prot->url_read_seek; -- 2.39.2