summaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-08 17:24:28 -0500
committerDudemanguy <random342@airmail.cc>2023-08-09 13:51:28 +0000
commit1df0a42a8cb12005311f6a03f3a1c4329c798f8c (patch)
treea437d1a5782f2aeb8e17202bed151f1ba5e67dd4 /filters
parentefefe3a6dcfb969ab9f5800b7aecb3ba685ffdbe (diff)
downloadmpv-1df0a42a8cb12005311f6a03f3a1c4329c798f8c.tar.bz2
mpv-1df0a42a8cb12005311f6a03f3a1c4329c798f8c.tar.xz
m_option: change m_option_type_aspect to double
This specific option type is only used for the video aspect. The underlying type was a float to represent the inputted value, but it's actually not precise enough. When using something like 4:3, the values of the incorrect digits are actually significant enough to make av_d2q return a very funky numerator and denominator which is close to 4/3 but not quite. This leads to some "off by one pixel" errors. Weirdly, mpv's actual calculations for this were already being done as double, but then converted to floats for this specific type. Just drop the conversion step and leave it all as double which has the precision we need (i.e. AVRational is now 4/3 for the this case). Fixes #8190.
Diffstat (limited to 'filters')
-rw-r--r--filters/f_decoder_wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/f_decoder_wrapper.c b/filters/f_decoder_wrapper.c
index b0c174955b..5553002821 100644
--- a/filters/f_decoder_wrapper.c
+++ b/filters/f_decoder_wrapper.c
@@ -93,7 +93,7 @@ static const struct m_sub_options adec_queue_conf = {
#define OPT_BASE_STRUCT struct dec_wrapper_opts
struct dec_wrapper_opts {
- float movie_aspect;
+ double movie_aspect;
int aspect_method;
double force_fps;
bool correct_pts;