summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_dec.cpp
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2016-06-18 15:49:01 +0200
committerMarton Balint <cus@passwd.hu>2016-06-26 19:17:37 +0200
commit1fc85d8511fb059450e36f2493b273635d507aa3 (patch)
treef5ecc4682a41469a57d261cf33c3039e1a5ac0ea /libavdevice/decklink_dec.cpp
parent340cea9f22c162e10d120835661e132721b7454b (diff)
avdevice/decklink: factorize cleanup function to common code
Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_dec.cpp')
-rw-r--r--libavdevice/decklink_dec.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 3b5d4be56a..8b57e0cd08 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -419,11 +419,7 @@ av_cold int ff_decklink_read_close(AVFormatContext *avctx)
ctx->dli->DisableAudioInput();
}
- if (ctx->dli)
- ctx->dli->Release();
- if (ctx->dl)
- ctx->dl->Release();
-
+ ff_decklink_cleanup(avctx);
avpacket_queue_end(&ctx->queue);
av_freep(&cctx->ctx);
@@ -620,10 +616,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
return 0;
error:
-
- ctx->dli->Release();
- ctx->dl->Release();
-
+ ff_decklink_cleanup(avctx);
return AVERROR(EIO);
}