summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index ab5608942a..aebda8dd70 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -151,8 +151,10 @@ const struct hwdec_profile_entry *hwdec_find_profile(
enum AVCodecID codec = ctx->avctx->codec_id;
int profile = ctx->avctx->profile;
// Assume nobody cares about these aspects of the profile
- if (codec == AV_CODEC_ID_H264)
- profile &= ~(FF_PROFILE_H264_CONSTRAINED | FF_PROFILE_H264_INTRA);
+ if (codec == AV_CODEC_ID_H264) {
+ if (profile == FF_PROFILE_H264_CONSTRAINED_BASELINE)
+ profile = FF_PROFILE_H264_MAIN;
+ }
for (int n = 0; table[n].av_codec; n++) {
if (table[n].av_codec == codec) {
if (table[n].ff_profile == FF_PROFILE_UNKNOWN ||