From 04c13c6ff30e41bb4d4f3737ed61b63da6e3debc Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 18 Feb 2021 13:30:38 -0500 Subject: [PATCH] Handle value of auto for encoder --- src/zm_videostore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index c196412a3..b2b95e39d 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -164,7 +164,7 @@ bool VideoStore::open() { std::string wanted_encoder = monitor->Encoder(); for ( unsigned int i = 0; i < sizeof(codec_data) / sizeof(*codec_data); i++ ) { - if ( wanted_encoder != "" ) { + if ( wanted_encoder != "" and wanted_encoder != "auto" ) { if ( wanted_encoder != codec_data[i].codec_name ) { Debug(1, "Not the right codec name %s != %s", codec_data[i].codec_name, wanted_encoder.c_str()); continue; @@ -262,7 +262,7 @@ bool VideoStore::open() { // We allocate and copy in newer ffmpeg, so need to free it avcodec_free_context(&video_out_ctx); #endif - video_out_ctx = nullptr; + //video_out_ctx = nullptr; return false; } // end if can't open codec