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_enc.cpp | |
parent | 340cea9f22c162e10d120835661e132721b7454b (diff) | |
download | ffmpeg-1fc85d8511fb059450e36f2493b273635d507aa3.tar.gz |
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_enc.cpp')
-rw-r--r-- | libavdevice/decklink_enc.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 6c5450f4ec..4d00a537ec 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -193,10 +193,7 @@ av_cold int ff_decklink_write_trailer(AVFormatContext *avctx) ctx->dlo->DisableAudioOutput(); } - if (ctx->dlo) - ctx->dlo->Release(); - if (ctx->dl) - ctx->dl->Release(); + ff_decklink_cleanup(avctx); if (ctx->output_callback) delete ctx->output_callback; @@ -400,10 +397,7 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) return 0; error: - - ctx->dlo->Release(); - ctx->dl->Release(); - + ff_decklink_cleanup(avctx); return AVERROR(EIO); } |