sd_lavc: add a hack ontop of another hack to fix completely fucked file

Do what we do best in multimedia: add conflicting hacks on top of other
hacks, that fix a single sample, and may break other ones.

In this case, it only happens if the file is most likely already broken
(subtitle bounding boxes go outside of the subtitle "canvas"), so it's
OK. The file still looks broken (and, in fact, the file is completely
fucking broken), but you can see the subtitles.

But in summary, this is not actually something I should have bothered
about.

I noticed that MPlayer shows the subtitles "correctly", but this is only
because they have a hack that extends subtitles with small resolution to
a larger hardcoded resolution. This hack was removed from mpv, because
it broke some completely legitimate files. As another really funny fact,
MPlayer's default video output (vdpau) appears to display this file
correctly, but only because it handles narrow aspect ratios (that extend
the height instead of the width) incorrectly. It extends the height, but
leaves the video with 1:1 aspect ratio at the top. It seems to repeat
the last video line. (-vo xv and -vo gl show it correctly, i.e.
stretched like mpv, by the way.) For some reason, the sample file at
hand is extended with black, so the subtitles are rendered into a black
area below the video, which is almost reasonable. So, MPlayer may
display this file "correctly", but in fact it only happens to do so
because of 1 hack that breaks legitimate files, and 1 bug. What the
fuck.

Fixes: #7218 (sort of)
This commit is contained in:
wm4 2019-12-03 22:33:45 +01:00
parent e5b016b7bf
commit fd28be400c
1 changed files with 2 additions and 2 deletions

View File

@ -451,8 +451,8 @@ static void get_bitmaps(struct sd *sd, struct mp_osd_res d, int format,
h = priv->video_params.h;
}
if (current->src_w > w || current->src_h > h) {
w = priv->video_params.w;
h = priv->video_params.h;
w = MPMAX(priv->video_params.w, current->src_w);
h = MPMAX(priv->video_params.h, current->src_h);
}
if (opts->sub_pos != 100 && opts->ass_style_override) {