diff options
author | Marton Balint <cus@passwd.hu> | 2016-06-18 15:49:01 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2016-06-26 19:17:37 +0200 |
commit | 1fc85d8511fb059450e36f2493b273635d507aa3 (patch) | |
tree | f5ecc4682a41469a57d261cf33c3039e1a5ac0ea /libavdevice/decklink_common.cpp | |
parent | 340cea9f22c162e10d120835661e132721b7454b (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_common.cpp')
-rw-r--r-- | libavdevice/decklink_common.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index ac7964cd17..43599b6b2b 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -239,3 +239,16 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct return 0; } + +void ff_decklink_cleanup(AVFormatContext *avctx) +{ + struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; + struct decklink_ctx *ctx = (struct decklink_ctx *) cctx->ctx; + + if (ctx->dli) + ctx->dli->Release(); + if (ctx->dlo) + ctx->dlo->Release(); + if (ctx->dl) + ctx->dl->Release(); +} |