Skip to content

Commit d121aac

Browse files
committed
hd-rum-decompress: remove try block
As already in main.cpp, video_rxtx::create must not throw so remove and unindent.
1 parent f14a73b commit d121aac

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

src/hd-rum-translator/hd-rum-decompress.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,19 +222,17 @@ void *hd_rum_decompress_init(struct module *parent, struct hd_rum_output_conf co
222222
params.decoder_mode = VIDEO_NORMAL;
223223
params.display_device = s->display;
224224

225-
try {
226-
s->video_rxtx = video_rxtx::create("ultragrid_rtp", &params, &s->common);
227-
assert(s->video_rxtx);
225+
s->video_rxtx =
226+
video_rxtx::create("ultragrid_rtp", &params, &s->common);
227+
assert(s->video_rxtx);
228228

229-
s->worker_thread = thread(&state_transcoder_decompress::worker, s);
230-
display_run_new_thread(s->display);
229+
s->worker_thread = thread(&state_transcoder_decompress::worker, s);
230+
display_run_new_thread(s->display);
231231

232-
if (capture_filter_init(parent, capture_filter, &s->capture_filter_state) != 0) {
233-
log_msg(LOG_LEVEL_ERROR, "Unable to initialize capture filter!\n");
234-
return nullptr;
235-
}
236-
} catch (const std::string& error_msg) {
237-
LOG(LOG_LEVEL_ERROR) << error_msg << "\n";
232+
if (capture_filter_init(parent, capture_filter,
233+
&s->capture_filter_state) != 0) {
234+
log_msg(LOG_LEVEL_ERROR,
235+
"Unable to initialize capture filter!\n");
238236
return nullptr;
239237
}
240238

0 commit comments

Comments
 (0)