Commit 95324ecf authored by Marton Balint's avatar Marton Balint

avdevice/decklink_dec: fix stopping streams in read_close

The capture_started variable was never set, it is simpler to call the stop
functions unconditionally if the interface is available.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 3e9793cf
......@@ -115,7 +115,6 @@ struct decklink_ctx {
/* Status */
int playback_started;
int capture_started;
int64_t last_pts;
unsigned long frameCount;
unsigned int dropped;
......
......@@ -983,7 +983,7 @@ av_cold int ff_decklink_read_close(AVFormatContext *avctx)
struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
if (ctx->capture_started) {
if (ctx->dli) {
ctx->dli->StopStreams();
ctx->dli->DisableVideoInput();
ctx->dli->DisableAudioInput();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment