(It could be more efficient, but who cares? pipe overhead is probably
worse)
break;
vlc_cleanup_push (cleanup_mmap, buf);
#else
break;
vlc_cleanup_push (cleanup_mmap, buf);
#else
- unsigned char buf[bufsize];
+ unsigned char *buf = malloc (bufsize);
+ if (unlikely(buf == NULL))
+ break;
+ vlc_cleanup_push (free, buf);
#endif
len = stream_Read (stream->p_source, buf, bufsize);
#endif
len = stream_Read (stream->p_source, buf, bufsize);
-#ifdef HAVE_VMSPLICE
- vlc_cleanup_run (); /* munmap (buf, bufsize) */
-#endif
+ vlc_cleanup_run (); /* free (buf) */