omx: display states as string if changing failed

Improve the error message by displaying the states in their string
representation rather than their numerical value.

https://bugzilla.gnome.org/show_bug.cgi?id=787235
This commit is contained in:
Guillaume Desmottes 2017-09-04 09:34:03 +02:00 committed by Tim-Philipp Müller
parent 054d5da46e
commit 318ef5b357

View file

@ -852,8 +852,9 @@ done:
if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent,
"Error setting %s state from %d to %d: %s (0x%08x)", comp->name,
old_state, state, gst_omx_error_to_string (err), err);
"Error setting %s state from %s to %s: %s (0x%08x)", comp->name,
gst_omx_state_to_string (old_state), gst_omx_state_to_string (state),
gst_omx_error_to_string (err), err);
}
return err;
}