summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-06-20 08:58:38 -0700
committerJohn Stebbins <[email protected]>2018-06-20 08:58:38 -0700
commit8dc6f43fee5df5c90b4c61cf9233a443883cdf6d (patch)
treec3a4ff14151b2256ae75f007e493c7d6bc573959 /libhb
parent5132da551846c8d992b2ae6ef41c81470bfdb85b (diff)
decavcodec: fix crash during audio probe
Audio probe does not set w->audio.
Diffstat (limited to 'libhb')
-rw-r--r--libhb/decavcodec.c7
1 files 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;