The capture_started variable was never set, it is simpler to call the stop functions unconditionally if the interface is available.
Showing the changes to libavdevice/decklink_dec.cpp (1 of 2 files). Show all
Unified · Split
| @@ -983,7 +983,7 @@ av_cold int ff_decklink_read_close(AVFormatContext *avctx) · 982 unmodified lines | |||
| 983 | struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data; | 983 | struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data; |
| 984 | struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; | 984 | struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; |
| 985 | 985 | ||
| 986 | if (ctx->capture_started) { | 986 | if (ctx->dli) { |
| 987 | ctx->dli->StopStreams(); | 987 | ctx->dli->StopStreams(); |
| 988 | ctx->dli->DisableVideoInput(); | 988 | ctx->dli->DisableVideoInput(); |
| 989 | ctx->dli->DisableAudioInput(); | 989 | ctx->dli->DisableAudioInput(); |