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
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue