From: John Stebbins Date: Tue, 24 Jan 2017 17:59:58 +0000 (-0700) Subject: decavcodec: fix crash in decavcodecvInfo X-Git-Tag: 1.0.3~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29d07075d0ceed9c373a42969596e6a743b67a50;p=handbrake decavcodec: fix crash in decavcodecvInfo If avcodec_open fails, pv->context->codec is NULL, but work->info may still be called by scan. (cherry picked from commit 4425691a0fd57b30360d39df3bdeebb9cc9b577f) --- diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index c81168d52..c8b12d770 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1860,7 +1860,7 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info ) memset( info, 0, sizeof(*info) ); - if (pv->context == NULL) + if (pv->context == NULL || pv->context->codec == NULL) return 0; info->bitrate = pv->context->bit_rate;