dvbsuboverlay: Handle non_modifying_colour_flag correctly in the RLE handlers
authorMart Raudsepp <mart.raudsepp@collabora.com>
Wed, 21 Dec 2011 11:00:27 +0000 (13:00 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 11 Jul 2012 11:42:02 +0000 (13:42 +0200)
commit76ddd498e2198aa3c879e0248acdd2fe286c206a
tree221633cc8e8de07f27ac06c0ca13d7beaaf3746a
parenteabb238b2445084abe8aafdbb884368179b512fe
dvbsuboverlay: Handle non_modifying_colour_flag correctly in the RLE handlers

The check for when to not memset was checking on an undeterministic 'bits' variable value,
which is only meant to be used inside the loop earlier when it is supposed to check if
clut_index is 1 together with non_mod set, as per spec:

"non_modifying_colour_flag:  If set to '1' this indicates that the CLUT entry value '1'
is a non modifying colour. When the non modifying colour is assigned to an object pixel,
then the pixel of the underlying region background or object shall not be modified. This
can be used to create "transparent holes" in objects."

https://bugzilla.gnome.org/show_bug.cgi?id=666352
gst/dvbsuboverlay/dvb-sub.c