summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-13 22:54:15 +0100
committerwm4 <wm4@nowhere>2014-02-13 22:54:47 +0100
commit2a2dfd232707ae05254cd0dcb75aac933e9fcf7d (patch)
tree12e3b4135df00636231ee90734868212f8f5834a /sub/dec_sub.c
parent8009646583d523fc045d10c726a3ee11d9d3d3ff (diff)
downloadmpv-2a2dfd232707ae05254cd0dcb75aac933e9fcf7d.tar.bz2
mpv-2a2dfd232707ae05254cd0dcb75aac933e9fcf7d.tar.xz
sub: handle vobsub-in-mp4
The mplayer decoder (spudec.c) actually handled this. There was explicit code for binary palettes (16 32 bit values), and the subtitle resolution was handled by video resolution coincidentally matching the subtitle resolution. Whoever puts vobsub into mp4 should be punished. Fixes the sample gundam_sample.mp4, closes github issue #547.
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r--sub/dec_sub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index 46c5b3fafb..fdb8d8f648 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -210,6 +210,8 @@ void sub_init_from_sh(struct dec_sub *sub, struct sh_stream *sh)
struct sd init_sd = sub->init_sd;
init_sd.codec = sh->codec;
init_sd.ass_track = sh->sub->track;
+ init_sd.sub_stream_w = sh->sub->w;
+ init_sd.sub_stream_h = sh->sub->h;
while (sub->num_sd < MAX_NUM_SD) {
struct sd *sd = talloc(NULL, struct sd);