[vlc-devel] [PATCH] dvbsub.c : Don't fill region if page_state == 0

Björn Stenberg bjorn at haxx.se
Thu Jun 17 10:44:55 CEST 2010

Simon Hailes wrote:
> This is correct behaviour.  region_fill is set only when you *want* the
> region to be cleared to the specified background colour.

You can look at region_fill_flag as either a function call or a style indicator. If you see it as a function call, the decoder should fill the region every time it sees the flag. However, paragraph "5.3.4 Region fill" says:

  Where the region fill flag is set, the region fill in the subtitle decoder
  model happens before any objects are rendered into the region.

This suggests that the decoder should not fill a region after it has had objects rendered onto it. Alternatively, that if you refill the region you must re-render the objects.

And this fits rather well with viewing the flag as a style indicator instead, meaning "this region should have a filled background." Any subsequent "normal case" packets hence naturally have the flag set too, since the style has not changed.

> If you ignore region_fill for page_state 'normal' (0), then you can't
> clear/fill a region without an acquisition point or mode change (except by
> covering it with other blank objects :) ).

Sure you can, simply update the objects with empty bitmaps.


More information about the vlc-devel mailing list