diff --git a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp
index 8b618ce45124a6350247121c3c2f54fcdcba63fd..82fd0b61e0399f367ccce8bbb9c228293d9b36e5 100755
--- a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp
+++ b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp
@@ -1486,7 +1486,7 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
 	#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
 			if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0)
 	#else
-				if (avio_open(&oc->pb, filename, 1) < 0)
+                if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0)
 	#endif
         {
             return false;