summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorharklu <harklu@wat>2011-08-04 21:47:36 +0200
committerUoti Urpala <uau@mplayer2.org>2011-08-12 14:19:10 +0300
commit9e6933440ae59c523fce85b64d6f52f444910003 (patch)
tree2b54de48e505866e95c946db1b3e497bfcc9867b /libmpcodecs
parente30416c9979232bf86cb58992421e66e03eda492 (diff)
downloadmpv-9e6933440ae59c523fce85b64d6f52f444910003.tar.bz2
mpv-9e6933440ae59c523fce85b64d6f52f444910003.tar.xz
options, subs: add --ass-vsfilter-aspect-compat
Add option --ass-vsfilter-aspect-compat and corresponding property ass_vsfilter_aspect_compat. The setting controls whether to enable the emulation of traditional VSFilter behavior where subtitles are stretched if the video is anamorphic (previously always enabled for native SSA/ASS subtitles). Enabled by default. Add 'V' as a new default keybinding to toggle the property.
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_ass.c5
-rw-r--r--libmpcodecs/vf_vo.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c
index 76a08807e7..c34c0b88e3 100644
--- a/libmpcodecs/vf_ass.c
+++ b/libmpcodecs/vf_ass.c
@@ -358,8 +358,9 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
{
struct osd_state *osd = vf->priv->osd;
ASS_Image *images = 0;
- ASS_Renderer *renderer = osd->vsfilter_aspect ?
- vf->priv->renderer_vsfilter : vf->priv->renderer_realaspect;
+ ASS_Renderer *renderer = osd->vsfilter_aspect
+ && vf->opts->ass_vsfilter_aspect_compat
+ ? vf->priv->renderer_vsfilter : vf->priv->renderer_realaspect;
if (sub_visibility && renderer && osd->ass_track
&& (pts != MP_NOPTS_VALUE)) {
if (osd->ass_force_reload) {
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index 62ec64ef3f..347c1e96b1 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -23,6 +23,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "options.h"
#include "mp_image.h"
#include "vf.h"
@@ -155,7 +156,7 @@ static int control(struct vf_instance *vf, int request, void* data)
double pts = video_out->next_pts;
ASS_Renderer *renderer;
double scale;
- if (osd->vsfilter_aspect) {
+ if (osd->vsfilter_aspect && vf->opts->ass_vsfilter_aspect_compat) {
renderer = vf->priv->renderer_vsfilter;
scale = vf->priv->scale_ratio;
} else {