From 6de19ea572a3fccbcfdc110686230c2f47fecebe Mon Sep 17 00:00:00 2001 From: MrDave Date: Sun, 2 May 2021 17:49:17 -0600 Subject: [PATCH] Log message only for audio cameras --- src/movie.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/movie.cpp b/src/movie.cpp index 61d46fa9..a64e444e 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -1294,12 +1294,14 @@ static int movie_passthru_open(struct ctx_movie *movie) return -1; } - MOTION_LOG(DBG, TYPE_ENCODER, NO_ERRNO - , _("Timebase after open audio: %d/%d video: %d/%d") - , movie->strm_audio->time_base.num - , movie->strm_audio->time_base.den - , movie->strm_video->time_base.num - , movie->strm_video->time_base.den); + if (movie->strm_audio != NULL) { + MOTION_LOG(DBG, TYPE_ENCODER, NO_ERRNO + , _("Timebase after open audio: %d/%d video: %d/%d") + , movie->strm_audio->time_base.num + , movie->strm_audio->time_base.den + , movie->strm_video->time_base.num + , movie->strm_video->time_base.den); + } MOTION_LOG(INF, TYPE_ENCODER, NO_ERRNO, "Pass-through stream opened");