avdevice/decklink: factorize cleanup function to common code
Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
340cea9f22
commit
1fc85d8511
4 changed files with 18 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue