coverity: fixed resolution leak issues
coverity: fixed unchecked return value
work on codec mode
xorg: capture change