mpv/sub
xylosper d857722618 sd_lavc: handle subtitles with no subtitle resolution set
Set subtitle resolution to video resolution when avctx->width and
avctx->height are zero.

This can happen with broken vobsubs that have no size set in their
.idx file (or Matroska extradata). At least with the test file provided
in issue #551, using the video resolution as fallback instead of what
guess_resolution() does is better.

Note that these files clearly are broken. It seems this particular
file was created by trying to use ffmpeg to transcode DVB subtitles
to vobsub, and ffmpeg "forgot" to set the subtitle resolution in the
destination file. On the other hand, ffmpeg DVB and PGS decoders set
the resolution on the first subtitle packet (or somewhere close), so
it's not really clear what to do here.

Closes #551.

Signed-off-by: wm4 <wm4@nowhere>

Patch by xylosper, rewritten commit message by wm4.
2014-03-11 00:09:52 +01:00
..
ass_mp.c msg: rename mp_msg_log -> mp_msg 2013-12-21 22:13:04 +01:00
ass_mp.h sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
dec_sub.c sub: handle vobsub-in-mp4 2014-03-11 00:08:29 +01:00
dec_sub.h sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
draw_bmp.c
draw_bmp.h
find_subfiles.c path lookup functions: mp_msg conversions 2013-12-21 21:43:17 +01:00
find_subfiles.h
img_convert.c
img_convert.h
osd.c player: add --secondary-sid for displaying a second subtitle stream 2013-12-24 17:46:14 +01:00
osd.h player: add --secondary-sid for displaying a second subtitle stream 2013-12-24 17:46:14 +01:00
osd_dummy.c
osd_font.otf
osd_libass.c player: add --secondary-sid for displaying a second subtitle stream 2013-12-24 17:46:14 +01:00
sd.h sub: handle vobsub-in-mp4 2014-03-11 00:08:29 +01:00
sd_ass.c sub: fix crash with certain uses of --vf=sub 2014-01-31 19:06:58 +01:00
sd_lavc.c sd_lavc: handle subtitles with no subtitle resolution set 2014-03-11 00:09:52 +01:00
sd_lavc_conv.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
sd_lavf_srt.c
sd_microdvd.c
sd_movtext.c
sd_spu.c sub: fix crash with certain uses of --vf=sub 2014-01-31 19:06:58 +01:00
sd_srt.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
spudec.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
spudec.h sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00