* 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"
if (flags & URL_RDWR) {
access = O_CREAT | O_TRUNC | O_RDWR;
} else if (flags & URL_WRONLY) {
- access = O_CREAT | O_TRUNC | O_WRONLY | O_DIRECT;
+ access = O_CREAT | O_TRUNC | O_WRONLY;
} else {
access = O_RDONLY;
}
#ifdef O_BINARY
access |= O_BINARY;
#endif
+ access |= O_DIRECT;
fd = open(filename, access, 0666);
if (fd < 0)
return AVERROR(ENOENT);