[vlc-devel] [PATCH] Fixed warning on deprecated av_set_cpu_flags_mask usage

Maxim Bublis b at codemonkey.ru
Fri Nov 22 21:07:24 CET 2013


---
 modules/codec/avcodec/avcodec.c  | 2 +-
 modules/codec/avcodec/avcommon.h | 2 +-
 modules/codec/avcodec/encoder.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index d403202..335dd60 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -303,7 +303,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* set CPU capabilities */
 #if LIBAVUTIL_VERSION_CHECK(51, 25, 0, 42, 100)
-    av_set_cpu_flags_mask( INT_MAX & ~GetVlcDspMask() );
+    av_force_cpu_flags( av_get_cpu_flags() );
 #else
     p_context->dsp_mask = GetVlcDspMask();
 #endif
diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
index dfd753e..31eb541 100644
--- a/modules/codec/avcodec/avcommon.h
+++ b/modules/codec/avcodec/avcommon.h
@@ -46,7 +46,7 @@ static inline void vlc_init_avformat(void)
     vlc_avcodec_lock();
 
 #if LIBAVUTIL_VERSION_CHECK(51, 25, 0, 42, 100)
-    av_set_cpu_flags_mask( INT_MAX & ~GetVlcDspMask() );
+    av_force_cpu_flags( av_get_cpu_flags() );
 #endif
 
     av_register_all();
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 85e150d..7390a95 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -330,7 +330,7 @@ int OpenEncoder( vlc_object_t *p_this )
 
     /* set CPU capabilities */
 #if LIBAVUTIL_VERSION_CHECK(51, 25, 0, 42, 100)
-    av_set_cpu_flags_mask( INT_MAX & ~GetVlcDspMask() );
+    av_force_cpu_flags( av_get_cpu_flags() );
 #else
     p_context->dsp_mask = GetVlcDspMask();
 #endif
-- 
1.8.3.4 (Apple Git-47)




More information about the vlc-devel mailing list