mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
avcodec/videotoolbox: use early return in videotoolbox_default_free
Cosmetic change only. Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
parent
230b91cdfd
commit
631296ff99
@ -849,15 +849,15 @@ static int videotoolbox_default_init(AVCodecContext *avctx)
|
||||
static void videotoolbox_default_free(AVCodecContext *avctx)
|
||||
{
|
||||
AVVideotoolboxContext *videotoolbox = videotoolbox_get_context(avctx);
|
||||
if (!videotoolbox)
|
||||
return;
|
||||
|
||||
if (videotoolbox) {
|
||||
if (videotoolbox->cm_fmt_desc)
|
||||
CFRelease(videotoolbox->cm_fmt_desc);
|
||||
if (videotoolbox->cm_fmt_desc)
|
||||
CFRelease(videotoolbox->cm_fmt_desc);
|
||||
|
||||
if (videotoolbox->session) {
|
||||
VTDecompressionSessionInvalidate(videotoolbox->session);
|
||||
CFRelease(videotoolbox->session);
|
||||
}
|
||||
if (videotoolbox->session) {
|
||||
VTDecompressionSessionInvalidate(videotoolbox->session);
|
||||
CFRelease(videotoolbox->session);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user