[vlc-devel] [PATCH 1/5] Fix Metadata marshalling when sending the PropertiesChanged signal

Alex Merry dev at randomguy3.me.uk
Mon Jan 28 11:40:42 CET 2013

On 28/01/13 09:03, Rémi Denis-Courmont wrote:
> On Sun, 27 Jan 2013 21:25:10 +0000, Alex Merry <dev at randomguy3.me.uk>
> wrote:
>> 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.
> I don't mind the patch, but I fail to see how it fixes marshalling in any
> way...?

Actually, looking at it again, I suspect this patch only delays the
problem.  I think the actualy issue occurs when GetInputMeta is not
called, in which case the variant is never populated with the "a{sv}"
structure that the call to dbus_message_iter_open_container claimed it
would be.

This patch "fixed" that by using CurrentPlayingItem, which still exists
when the track is stopped.  The real fix comes in the next patch in the
series, when this code is replaced by MashallMetadata.  That function
properly generates an empty a{sv} when GetInputMeta is not called.

Aaand this is why you shouldn't make fixes when you don't understand
*why* they fix the problem :-)


More information about the vlc-devel mailing list