Fix Metadata marshalling when sending the PropertiesChanged signal
Fix Metadata marshalling when sending the PropertiesChanged signal

VLC was getting kicked from the D-Bus when a track was stopped, because
it was generating invalid data on the wire when sending the
PropertiesChanged signal for the Metadata property.

The issue was that if there was now no current track, GetInputMeta would
never be called and the the variant would never be populated with the
"a{sv}" structure that the call to dbus_message_iter_open_container
claimed it would be.

We now share the code that GetProperties used, which dealt with this
correctly, although now both use CurrentInput (which is what the signal
previously used) instead of CurrentPlayingItem (which is what
GetProperties previously used).

Signed-off-by: Mirsal Ennaime <50b13d3c1479aee11f345431522e2ec1cf8e052d@videolan.org>

vlc-mirror/vlc-2.1,xkfz007/vlc,jomanmuk/vlc-2.1,shyamalschandra/vlc,shyamalschandra/vlc,xkfz007/vlc,jomanmuk/vlc-2.1,krichter722/vlc,vlc-mirror/vlc,xkfz007/vlc,jomanmuk/vlc-2.2,krichter722/vlc,krichter722/vlc,vlc-mirror/vlc,shyamalschandra/vlc,xkfz007/vlc,vlc-mirror/vlc-2.1,xkfz007/vlc,krichter722/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.2,shyamalschandra/vlc,xkfz007/vlc,krichter722/vlc,jomanmuk/vlc-2.1,jomanmuk/vlc-2.2,vlc-mirror/vlc,shyamalschandra/vlc,krichter722/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,shyamalschandra/vlc,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,vlc-mirror/vlc-2.1,jomanmuk/vlc-2.2,vlc-mirror/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,krichter722/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc,xkfz007/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.2