[vlc-commits] direct_va: use FF_PROFILE_UNKNOWN to mark the end of profile lists
Steve Lhomme
git at videolan.org
Fri Oct 4 12:28:18 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 4 10:14:36 2019 +0200| [a791a10b7253b69255d8904eb3c83d861c4d7921] | committer: Steve Lhomme
direct_va: use FF_PROFILE_UNKNOWN to mark the end of profile lists
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a791a10b7253b69255d8904eb3c83d861c4d7921
---
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 60454f651e..9f6ce7520c 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -42,17 +42,21 @@
#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)
@@ -370,7 +374,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