ffmpeg-encoder: Throw std::runtime_error instead of std::exception

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-04-02 17:05:02 +02:00
parent 59fa1d36d7
commit 3ad2424b22
2 changed files with 2 additions and 2 deletions

View file

@ -639,7 +639,7 @@ void ffmpeg_instance::initialize_sw(obs_data_t* settings)
std::stringstream sstr; std::stringstream sstr;
sstr << "Color Format '" << ::ffmpeg::tools::get_pixel_format_name(_pixfmt_target) sstr << "Color Format '" << ::ffmpeg::tools::get_pixel_format_name(_pixfmt_target)
<< "' is not supported by the encoder."; << "' is not supported by the encoder.";
throw std::exception(sstr.str().c_str()); throw std::runtime_error(sstr.str().c_str());
} }
} }

View file

@ -36,7 +36,7 @@ std::shared_ptr<AVFrame> avframe_queue::create_frame()
int res = av_frame_get_buffer(frame.get(), 32); int res = av_frame_get_buffer(frame.get(), 32);
if (res < 0) { if (res < 0) {
throw std::exception(tools::get_error_description(res)); throw std::runtime_error(tools::get_error_description(res));
} }
return frame; return frame;