summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-02 23:28:18 +0200
committerwm4 <wm4@nowhere>2012-10-16 07:26:31 +0200
commit466fc6d4d18ac1751527ccfff8f3c39eb3ff1e4b (patch)
treeb5fbb5af66359bf5a64e45f42838864d5d6cdff1 /mplayer.c
parent5357b38d40e28dda4032ddc8654f5877d4928860 (diff)
downloadmpv-466fc6d4d18ac1751527ccfff8f3c39eb3ff1e4b.tar.bz2
mpv-466fc6d4d18ac1751527ccfff8f3c39eb3ff1e4b.tar.xz
sub: make it easier to set DVD sub decoding with sd_lavc
With this commit, the player will still use spudec.c (the "old" DVD sub decoder), rather than ffmpeg. But it brings the changes needed to enable this down to a single line change: --- a/mplayer.c +++ b/mplayer.c @@ -1988,7 +1988,7 @@ static void reinit_subs(struct MPContext *mpctx) #endif vo_osd_changed(OSDTYPE_SUBTITLE); } else if (track->stream) { - if (mpctx->sh_sub->type == 'v') + if (mpctx->sh_sub->type == 'v' && false) init_vo_spudec(mpctx); else sub_init(mpctx->sh_sub, mpctx->osd); Also, copy the DVD resolution heuristics from spudec.c (from the spudec_new_scaled() function). I'm not sure if this is correct or even needed, but the sd_lavc codd explicitly reverted back to spudec with code carrying this comment: // Assume resolution heuristics only work for PGS and DVB so it seems likely that the required heuristics were missing, and that the spudec heuristics may make the DVD compatibility situation at least as good as with spudec. Note that it's unlikely that we enable sd_lavc for DVD subs by default, as there are other problems in combination with direct DVD playback.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 6fe8c649c4..a885fac8ca 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1795,7 +1795,9 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl)
}
// DVD sub:
- if (track->vobsub_id_plus_one || type == 'v') {
+ if ((track->vobsub_id_plus_one || type == 'v')
+ && !(sh_sub && sh_sub->active))
+ {
int timestamp;
// Get a sub packet from the demuxer (or the vobsub.c thing, which
// should be a demuxer, but isn't).