avconv_vaapi: fix double-free with some unsupported streams

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Mark Thompson 2016-05-09 18:53:48 +01:00 committed by Luca Barbato
parent 885a9d6087
commit 0c1d66a079
1 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ static int vaapi_build_decoder_config(VAAPIDecoderContext *ctx,
alt_profile = vaapi_profile_map[i].codec_profile;
}
}
av_free(profile_list);
av_freep(&profile_list);
if (profile == VAProfileNone) {
av_log(ctx, loglevel, "No VAAPI support for codec %s.\n",
@ -374,7 +374,7 @@ fail:
av_hwframe_constraints_free(&constraints);
av_freep(&hwconfig);
vaDestroyConfig(hwctx->display, ctx->va_config);
av_free(profile_list);
av_freep(&profile_list);
return err;
}