From 31189bdb1104650d6bb316fbf24434a62e14e7f4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 12 Dec 2017 12:38:30 -0500 Subject: [PATCH] make an error not fatal and check return to quiet coverity --- src/zm_videostore.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 8c02d6e3f..350c4cc6b 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -101,7 +101,8 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in, video_out_stream = avformat_new_stream(oc, NULL); if (!video_out_stream) { - Fatal("Unable to create video out stream\n"); + Error("Unable to create video out stream\n"); + return; } else { Debug(2, "Success creating video out stream"); } @@ -563,7 +564,9 @@ bool VideoStore::setup_resampler() { #endif AVDictionary *opts = NULL; - av_dict_set(&opts, "strict", "experimental", 0); + if ( (ret = av_dict_set(&opts, "strict", "experimental", 0)) < 0 ) { + Error("Couldn't set experimental"); + } ret = avcodec_open2(audio_out_ctx, audio_out_codec, &opts); av_dict_free(&opts); if (ret < 0) {