From a26d0ffa18dbbd29555a971130307adf397e0e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sat, 1 Nov 2014 13:44:21 +0100 Subject: [PATCH] vdpau_mpeg4: Do not fail on unknown profile. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a regression, previous code did not require users to set the profile to use VDPAU. In addition, ASP is a superset of SP, so there is not even a good reason to require it. Signed-off-by: Reimar Döffinger --- libavcodec/vdpau_mpeg4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c index 2a036b61dd..9141becd9f 100644 --- a/libavcodec/vdpau_mpeg4.c +++ b/libavcodec/vdpau_mpeg4.c @@ -119,6 +119,9 @@ static int vdpau_mpeg4_init(AVCodecContext *avctx) case FF_PROFILE_MPEG4_SIMPLE: profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP; break; + // As any ASP decoder must be able to decode SP, this + // should be a safe fallback if profile is unknown/unspecified. + case FF_PROFILE_UNKNOWN: case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP; break;