Commit 631296ff authored by Aman Gupta's avatar Aman Gupta

avcodec/videotoolbox: use early return in videotoolbox_default_free

Cosmetic change only.
Signed-off-by: 's avatarAman Gupta <aman@tmm1.net>
parent 230b91cd
...@@ -849,15 +849,15 @@ static int videotoolbox_default_init(AVCodecContext *avctx) ...@@ -849,15 +849,15 @@ static int videotoolbox_default_init(AVCodecContext *avctx)
static void videotoolbox_default_free(AVCodecContext *avctx) static void videotoolbox_default_free(AVCodecContext *avctx)
{ {
AVVideotoolboxContext *videotoolbox = videotoolbox_get_context(avctx); AVVideotoolboxContext *videotoolbox = videotoolbox_get_context(avctx);
if (!videotoolbox)
return;
if (videotoolbox) { if (videotoolbox->cm_fmt_desc)
if (videotoolbox->cm_fmt_desc) CFRelease(videotoolbox->cm_fmt_desc);
CFRelease(videotoolbox->cm_fmt_desc);
if (videotoolbox->session) { if (videotoolbox->session) {
VTDecompressionSessionInvalidate(videotoolbox->session); VTDecompressionSessionInvalidate(videotoolbox->session);
CFRelease(videotoolbox->session); CFRelease(videotoolbox->session);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment