Message ID | 20171108181753.6776-4-timo@rothenpieler.org |
---|---|
State | New |
Headers | show |
On 08/11/17 18:17, Timo Rothenpieler wrote: > Fixes CID #1419524 and #1412855 > --- > libavcodec/vaapi_decode.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c > index 27ef33837c..a782cfd8da 100644 > --- a/libavcodec/vaapi_decode.c > +++ b/libavcodec/vaapi_decode.c > @@ -281,8 +281,9 @@ static int vaapi_decode_make_config(AVCodecContext *avctx) > VAStatus vas; > int err, i, j; > const AVCodecDescriptor *codec_desc; > - VAProfile profile, va_profile, *profile_list = NULL; > - int profile_count, exact_match, alt_profile; > + VAProfile va_profile = VAProfileNone; > + VAProfile profile, *profile_list = NULL; > + int profile_count, exact_match, alt_profile = 0; > const AVPixFmtDescriptor *sw_desc, *desc; > > codec_desc = avcodec_descriptor_get(avctx->codec_id); > No - you're just hiding the bug by spuriously initialising the variables involved. I'll rewrite this section to be clearer and not have this bug. - Mark
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 27ef33837c..a782cfd8da 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -281,8 +281,9 @@ static int vaapi_decode_make_config(AVCodecContext *avctx) VAStatus vas; int err, i, j; const AVCodecDescriptor *codec_desc; - VAProfile profile, va_profile, *profile_list = NULL; - int profile_count, exact_match, alt_profile; + VAProfile va_profile = VAProfileNone; + VAProfile profile, *profile_list = NULL; + int profile_count, exact_match, alt_profile = 0; const AVPixFmtDescriptor *sw_desc, *desc; codec_desc = avcodec_descriptor_get(avctx->codec_id);