[FFmpeg-cvslog] avdevice/decklink_dec: fix stopping streams in read_close

Marton Balint git at videolan.org
Wed Feb 26 22:51:32 EET 2020


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Fri Feb 21 20:39:31 2020 +0100| [95324ecf235a467f6804019e250e59bca576922a] | committer: 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: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95324ecf235a467f6804019e250e59bca576922a
---

 libavdevice/decklink_common.h | 1 -
 libavdevice/decklink_dec.cpp  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 8b3dbce2fb..27ce6a8a40 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -115,7 +115,6 @@ struct decklink_ctx {
 
     /* Status */
     int playback_started;
-    int capture_started;
     int64_t last_pts;
     unsigned long frameCount;
     unsigned int dropped;
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 1fd5adf515..c8d931517e 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -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();



More information about the ffmpeg-cvslog mailing list