[vlc-devel] [PATCH 3/5] Decklink: Simplify format mode logging
Marvin Scholz
epirat07 at gmail.com
Mon Oct 22 10:11:19 CEST 2018
---
modules/access/decklink.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index 02b321d0da..46ddebfb46 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -262,15 +262,14 @@ public:
return S_OK;
decklink_str_t tmp_name;
- char *mode_name;
- if (mode->GetName(&tmp_name) != S_OK) {
- mode_name = strdup("unknown");
- } else {
+ char *mode_name = NULL;
+ if (mode->GetName(&tmp_name) == S_OK) {
mode_name = DECKLINK_STRDUP(tmp_name);
DECKLINK_FREE(tmp_name);
}
- msg_Dbg(demux_, "Video input format changed to %s", mode_name);
+ msg_Dbg(demux_, "Video input format changed to %s",
+ (mode_name) ? mode_name : "unknown");
free(mode_name);
if (!sys->autodetect) {
msg_Err(demux_, "Video format detection disabled");
--
2.19.1
More information about the vlc-devel
mailing list