[vlc-commits] direct_va: use FF_PROFILE_UNKNOWN to mark the end of profile lists

Steve Lhomme git at videolan.org
Wed Mar 25 11:23:30 CET 2020


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct  4 10:14:36 2019 +0200| [b50dce81f2b525325fe28d82a058dadfc80687cc] | committer: Steve Lhomme

direct_va: use FF_PROFILE_UNKNOWN to mark the end of profile lists

(cherry picked from commit a791a10b7253b69255d8904eb3c83d861c4d7921)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b50dce81f2b525325fe28d82a058dadfc80687cc
---

 modules/codec/avcodec/directx_va.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 18f007f36c..3c46bb960f 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -49,17 +49,21 @@ struct picture_sys_t {
 #include "../../packetizer/hevc_nal.h"
 
 static const int PROF_MPEG2_MAIN[]   = { FF_PROFILE_MPEG2_SIMPLE,
-                                         FF_PROFILE_MPEG2_MAIN, 0 };
+                                         FF_PROFILE_MPEG2_MAIN,
+                                         FF_PROFILE_UNKNOWN };
 static const int PROF_H264_HIGH[]    = { FF_PROFILE_H264_BASELINE,
                                          FF_PROFILE_H264_CONSTRAINED_BASELINE,
                                          FF_PROFILE_H264_MAIN,
-                                         FF_PROFILE_H264_HIGH, 0 };
-static const int PROF_HEVC_MAIN[]    = { FF_PROFILE_HEVC_MAIN, 0 };
+                                         FF_PROFILE_H264_HIGH,
+                                         FF_PROFILE_UNKNOWN };
+static const int PROF_HEVC_MAIN[]    = { FF_PROFILE_HEVC_MAIN,
+                                         FF_PROFILE_UNKNOWN };
 static const int PROF_HEVC_MAIN10[]  = { FF_PROFILE_HEVC_MAIN,
-                                         FF_PROFILE_HEVC_MAIN_10, 0 };
+                                         FF_PROFILE_HEVC_MAIN_10,
+                                         FF_PROFILE_UNKNOWN };
 
-static const int PROF_VP9_MAIN[]    = { FF_PROFILE_VP9_0, 0 };
-static const int PROF_VP9_10[]      = { FF_PROFILE_VP9_2, 0 };
+static const int PROF_VP9_MAIN[]    = { FF_PROFILE_VP9_0, FF_PROFILE_UNKNOWN };
+static const int PROF_VP9_10[]      = { FF_PROFILE_VP9_2, FF_PROFILE_UNKNOWN };
 
 #include <winapifamily.h>
 #if defined(WINAPI_FAMILY)
@@ -376,7 +380,7 @@ static bool profile_supported(const directx_va_mode_t *mode, const es_format_t *
 
         if (profile <= 0)
             is_supported = true;
-        else for (const int *p_profile = &mode->p_profiles[0]; *p_profile; ++p_profile)
+        else for (const int *p_profile = &mode->p_profiles[0]; *p_profile != FF_PROFILE_UNKNOWN; ++p_profile)
         {
             if (*p_profile == profile)
             {



More information about the vlc-commits mailing list