Merge commit '0c1d66a07917602303f129f5a5651faeec2415d5'
authorClément Bœsch <u@pkh.me>
Tue, 21 Jun 2016 20:22:51 +0000 (22:22 +0200)
committerClément Bœsch <u@pkh.me>
Tue, 21 Jun 2016 20:22:51 +0000 (22:22 +0200)
* commit '0c1d66a07917602303f129f5a5651faeec2415d5':
  avconv_vaapi: fix double-free with some unsupported streams

Merged-by: Clément Bœsch <u@pkh.me>
ffmpeg_vaapi.c

index c6bb9ee..d76c121 100644 (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;
 }