diff --git a/src/view/view.cpp b/src/view/view.cpp index 197b29e83..a759fddbf 100644 --- a/src/view/view.cpp +++ b/src/view/view.cpp @@ -173,7 +173,14 @@ int main(int argc, char** argv){ std::array errbuf; int frames = 0; int averr; - auto ncv = std::make_unique(argv[i], &averr, 1, 0, stretchmode); + std::unique_ptr ncv; + try{ + ncv = std::make_unique(argv[i], &averr, 1, 0, stretchmode); + }catch(std::exception& e){ + nc.stop(); + std::cerr << argv[i] << ": " << e.what() << "\n"; + return EXIT_FAILURE; + } if(!ncv){ av_make_error_string(errbuf.data(), errbuf.size(), averr); nc.stop();