mpv/sub
xylosper 87c13de656 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-02-14 16:38:31 +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-02-13 22:54:47 +01:00
dec_sub.h sub: uglify sub decoder with locking 2014-01-17 23:21:17 +01:00
draw_bmp.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
draw_bmp.h
find_subfiles.c vo: dropping subtitle files on the VO window adds them as subtitle files 2014-01-04 01:27:29 +01:00
find_subfiles.h vo: dropping subtitle files on the VO window adds them as subtitle files 2014-01-04 01:27:29 +01:00
img_convert.c Reduce recursive config.h inclusions in headers 2013-12-18 17:12:21 +01:00
img_convert.h
osd.c video/out: don't access aspdat in VOs 2014-01-22 00:35:52 +01:00
osd.h video/out: don't access aspdat in VOs 2014-01-22 00:35:52 +01:00
osd_dummy.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
osd_font.otf
osd_libass.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
osd_state.h sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
sd.h sub: handle vobsub-in-mp4 2014-02-13 22:54:47 +01:00
sd_ass.c sub: fix crash with certain uses of --vf=sub 2014-01-26 18:58:40 +01:00
sd_lavc.c sd_lavc: handle subtitles with no subtitle resolution set 2014-02-14 16:38:31 +01:00
sd_lavc_conv.c sub/osd: mp_msg conversions 2013-12-21 20:50:13 +01:00
sd_lavf_srt.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
sd_microdvd.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
sd_movtext.c
sd_spu.c sub: fix crash with certain uses of --vf=sub 2014-01-26 18:58:40 +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