@@ -1096,10 +1096,11 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
ctx->signal_loss_action = SIGNAL_LOSS_NONE;
av_log(avctx, AV_LOG_WARNING, "Setting signal_loss_action to none because draw_bars is false\n");
}
if (!ctx->draw_bars && ctx->signal_loss_action != SIGNAL_LOSS_NONE) {
av_log(avctx, AV_LOG_ERROR, "options draw_bars and signal_loss_action are mutually exclusive\n");
+ av_freep(&ctx);
return AVERROR(EINVAL);
}
ctx->audio_depth = cctx->audio_depth;
if (cctx->raw_format > 0 && (unsigned int)cctx->raw_format < FF_ARRAY_ELEMS(decklink_raw_format_map))
ctx->raw_format = decklink_raw_format_map[cctx->raw_format];