[vlc-devel] [PATCH 3/3] lib/media_player: inherit deinterlace and vbi variables to fix correct variables values on first use
Felix Paul Kühne
fkuehne at videolan.org
Wed Jan 22 15:19:05 CET 2014
On 22.01.2014, at 14:44, Rémi Denis-Courmont <remi at remlab.net> wrote:
> On Wed, 22 Jan 2014 14:42:53 +0100, Rémi Denis-Courmont <remi at remlab.net>
>>> - var_Create (mp, "deinterlace", VLC_VAR_INTEGER);
>>> + var_Create (mp, "deinterlace", VLC_VAR_INTEGER |
>>> var_Create (mp, "deinterlace-mode", VLC_VAR_STRING);
>>> - var_Create (mp, "vbi-page", VLC_VAR_INTEGER);
>>> + var_Create (mp, "vbi-page", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
>> There are no defined code paths that would lead to these variables
>> a non-zero values. This is a pointless loss of CPU time and wrong.
> For deinterlace, that is. For vbi-page, there should be a var_Set(100) -
> or a new var_Create() flag to explicitly take the default value rather than
Those setters are there indeed. However, the problem solved by this patch is a different one.
When asking libvlc to deinterlace the video or to show a certain vbi page, this will never work without this patch as the respective variables remain being set to 0. With this patch, they are correctly filled with the values I set, be it 444 for vbi or -1/0/1 for deinterlace.
Additionally, applying VLC_VAR_DOINHERIT matches the definitions for virtually all other integer variables created in this context, so it appears like it was forgotten to be added…
More information about the vlc-devel