mirror of https://github.com/FFmpeg/FFmpeg.git
The issue affects dvdsub subtitles (a.k.a. VOBSUB). Some players -- in particular hardware players -- cut off the lowest row of pixels if the number of rows in the subtitle is odd. The patch below implements a work-around for that. If the number of rows is odd, it is simply rounded up to an even number, adding an invisible (i.e. fully transparent) row. The work-around can be enabled or disabled with a new option -even_rows_fix. The default is disabled, so there is no change of behaviour for users who don't care about it. The overhead for the fix is low, and in many cases even zero: For subtitles with an odd number of rows (i.e. in 50% of cases on average), the size increases by two bytes because a fully transparent row is encoded as 0x00 0x00. However, in the VOBSUB standard, all data packets are padded to 2KB anyway, so in most cases the additional bytes just use some part of the padding, so there is no overhead. Only in the rare case that the 2KB boundary is hit (0.1% chance), a full 2KB block is added. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>pull/76/merge
parent
e36916a63f
commit
a32dcaaaf8
1 changed files with 25 additions and 0 deletions
Loading…
Reference in new issue