From 8dc6f43fee5df5c90b4c61cf9233a443883cdf6d Mon Sep 17 00:00:00 2001 From: John Stebbins <jstebbins.hb@gmail.com> Date: Wed, 20 Jun 2018 08:58:38 -0700 Subject: [PATCH] decavcodec: fix crash during audio probe Audio probe does not set w->audio. --- libhb/decavcodec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 8daca6604..279b6dcde 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -660,8 +660,11 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, av_dict_free( &av_opts ); return -1; } - context->pkt_timebase.num = audio->config.in.timebase.num; - context->pkt_timebase.den = audio->config.in.timebase.den; + if (audio != NULL) + { + context->pkt_timebase.num = audio->config.in.timebase.num; + context->pkt_timebase.den = audio->config.in.timebase.den; + } av_dict_free( &av_opts ); unsigned char *parse_buffer; -- 2.40.0