kmsagnosticbin2: unref input_caps when needed

Change-Id: I80159605b846c59b57da437c009970f2116847a9