make an error not fatal and check return to quiet coverity

This commit is contained in:
Isaac Connor 2017-12-12 12:38:30 -05:00
parent 9085a4b062
commit 31189bdb11
1 changed files with 5 additions and 2 deletions

View File

@ -101,7 +101,8 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
video_out_stream = avformat_new_stream(oc, NULL); video_out_stream = avformat_new_stream(oc, NULL);
if (!video_out_stream) { if (!video_out_stream) {
Fatal("Unable to create video out stream\n"); Error("Unable to create video out stream\n");
return;
} else { } else {
Debug(2, "Success creating video out stream"); Debug(2, "Success creating video out stream");
} }
@ -563,7 +564,9 @@ bool VideoStore::setup_resampler() {
#endif #endif
AVDictionary *opts = NULL; 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); ret = avcodec_open2(audio_out_ctx, audio_out_codec, &opts);
av_dict_free(&opts); av_dict_free(&opts);
if (ret < 0) { if (ret < 0) {