mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-02 04:43:27 +00: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:
parent
3e9793cf38
commit
95324ecf23
@ -115,7 +115,6 @@ struct decklink_ctx {
|
|||||||
|
|
||||||
/* Status */
|
/* Status */
|
||||||
int playback_started;
|
int playback_started;
|
||||||
int capture_started;
|
|
||||||
int64_t last_pts;
|
int64_t last_pts;
|
||||||
unsigned long frameCount;
|
unsigned long frameCount;
|
||||||
unsigned int dropped;
|
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_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
|
||||||
struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
|
struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
|
||||||
|
|
||||||
if (ctx->capture_started) {
|
if (ctx->dli) {
|
||||||
ctx->dli->StopStreams();
|
ctx->dli->StopStreams();
|
||||||
ctx->dli->DisableVideoInput();
|
ctx->dli->DisableVideoInput();
|
||||||
ctx->dli->DisableAudioInput();
|
ctx->dli->DisableAudioInput();
|
||||||
|
Loading…
Reference in New Issue
Block a user