1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2020-02-21 20:39:31 +01:00
parent 3e9793cf38
commit 95324ecf23
2 changed files with 1 additions and 2 deletions

View File

@ -115,7 +115,6 @@ struct decklink_ctx {
/* Status */
int playback_started;
int capture_started;
int64_t last_pts;
unsigned long frameCount;
unsigned int dropped;

View File

@ -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();