vd_lavc: refuse to initialize vaapi with unknown profiles

Bad idea, although I'm not sure how harmful it actually was.

Although this is common code, only the vaapi hwaccel still uses it.
This commit is contained in:
wm4 2015-10-11 18:48:02 +02:00
parent 94b6a1054e
commit 9e7069fde2
1 changed files with 1 additions and 3 deletions

View File

@ -190,9 +190,7 @@ const struct hwdec_profile_entry *hwdec_find_profile(
}
for (int n = 0; table[n].av_codec; n++) {
if (table[n].av_codec == codec) {
if (table[n].ff_profile == FF_PROFILE_UNKNOWN ||
profile == FF_PROFILE_UNKNOWN ||
table[n].ff_profile == profile ||
if (table[n].ff_profile == profile ||
!lavc_param->check_hw_profile)
return &table[n];
}