diff options
author | greg <greg@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-05 20:36:39 +0000 |
---|---|---|
committer | greg <greg@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-05 20:36:39 +0000 |
commit | a2020815ad088b6bed0329b04a8355388b6411e7 (patch) | |
tree | abe162698e78fb584e79b6b5f5e8997304edd717 | |
parent | 153e7ada4c60f2547f3b40828b8a0f86ba12384d (diff) |
Support a vsfilter special case:
If PlayResX or Y is 1280/1024 respectively and the other
PlayRes attribute isn't provided, use 1280/1024 for it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28817 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libass/ass_render.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 6b8ee70f3e..c01bb74963 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -224,9 +224,15 @@ static void ass_lazy_track_init(void) } else { double orig_aspect = (global_settings->aspect * frame_context.height * frame_context.orig_width) / frame_context.orig_height / frame_context.width; - if (!track->PlayResY) { + if (!track->PlayResY && track->PlayResX == 1280) { + track->PlayResY = 1024; + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResYUndefinedSettingY, track->PlayResY); + } else if (!track->PlayResY) { track->PlayResY = track->PlayResX / orig_aspect + .5; mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResYUndefinedSettingY, track->PlayResY); + } else if (!track->PlayResX && track->PlayResY == 1024) { + track->PlayResX = 1280; + mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResXUndefinedSettingX, track->PlayResX); } else if (!track->PlayResX) { track->PlayResX = track->PlayResY * orig_aspect + .5; mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_PlayResXUndefinedSettingX, track->PlayResX); |