From 3ad2424b2258a116b9fd65a6aed1c26e1bfea061 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 2 Apr 2020 17:05:02 +0200 Subject: [PATCH] ffmpeg-encoder: Throw std::runtime_error instead of std::exception --- source/encoders/ffmpeg-encoder.cpp | 2 +- source/ffmpeg/avframe-queue.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/encoders/ffmpeg-encoder.cpp b/source/encoders/ffmpeg-encoder.cpp index e4cef98..d930420 100644 --- a/source/encoders/ffmpeg-encoder.cpp +++ b/source/encoders/ffmpeg-encoder.cpp @@ -639,7 +639,7 @@ void ffmpeg_instance::initialize_sw(obs_data_t* settings) std::stringstream sstr; sstr << "Color Format '" << ::ffmpeg::tools::get_pixel_format_name(_pixfmt_target) << "' is not supported by the encoder."; - throw std::exception(sstr.str().c_str()); + throw std::runtime_error(sstr.str().c_str()); } } diff --git a/source/ffmpeg/avframe-queue.cpp b/source/ffmpeg/avframe-queue.cpp index d32a7d6..eb5e931 100644 --- a/source/ffmpeg/avframe-queue.cpp +++ b/source/ffmpeg/avframe-queue.cpp @@ -36,7 +36,7 @@ std::shared_ptr avframe_queue::create_frame() int res = av_frame_get_buffer(frame.get(), 32); if (res < 0) { - throw std::exception(tools::get_error_description(res)); + throw std::runtime_error(tools::get_error_description(res)); } return frame;