To better exploit BFQ scheduling.
#include "avformat.h"
#include "avio.h"
#include <stdarg.h>
+#include <malloc.h>
+#include <unistd.h>
#define IO_BUFFER_SIZE 32768
} else {
buffer_size = IO_BUFFER_SIZE;
}
- buffer = av_malloc(buffer_size);
+ buffer = memalign(sysconf(_SC_PAGESIZE), buffer_size);
if (!buffer)
return AVERROR(ENOMEM);
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
+#define _GNU_SOURCE
#include "libavutil/avstring.h"
#include "avformat.h"
#include <fcntl.h>
if (flags & URL_RDWR) {
access = O_CREAT | O_TRUNC | O_RDWR;
} else if (flags & URL_WRONLY) {
- access = O_CREAT | O_TRUNC | O_WRONLY;
+ access = O_CREAT | O_TRUNC | O_WRONLY | O_DIRECT;
} else {
access = O_RDONLY;
}