Verbose error reporting on setting custom field values #16
+3
-2
@@ -1003,8 +1003,9 @@ bool obsffmpeg::encoder::update(obs_data_t* settings)
|
||||
if ((ret = av_opt_set(_context, key.c_str(), value.c_str(),
|
||||
|
|
||||
AV_OPT_SEARCH_CHILDREN))
|
||||
< 0) {
|
||||
PLOG_WARNING("Option '%s' could not be set to '%s'.",
|
||||
key.c_str(), value.c_str());
|
||||
char sterror[AV_ERROR_MAX_STRING_SIZE];
|
||||
av_make_error_string(sterror, AV_ERROR_MAX_STRING_SIZE, ret);
|
||||
PLOG_WARNING("Option '%s' could not be set to '%s'. (%s)", key.c_str(), value.c_str(), sterror);
|
||||
}
|
||||
have_param = false;
|
||||
have_key = false;
|
||||
|
||||
Reference in New Issue
Block a user
No need to log setting options as a warning, we only need to know when things haven't been set. Remove this part.
I kinda like when it shows what was actually applied from the list that was passed, because it may get stick together. What if I leave it commented out (the whole else) so if needed for debugging it can be enabled. No?
No, if you were debugging you would already have knowledge about it anyway (FFmpeg logs to the debug output if enabled). For an end user, only the failed options need to be known.