summaryrefslogtreecommitdiffstats
path: root/video/mp_image.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-30 19:07:09 +0200
committerwm4 <wm4@nowhere>2016-05-30 19:07:22 +0200
commit079f67268f6f5a2ecfd12277b246b1937493c092 (patch)
tree9c34622e36c2fc51e410531532fe10b583a58f78 /video/mp_image.h
parent15bb05d2fe7394478144d323a41023722d1a9d38 (diff)
downloadmpv-079f67268f6f5a2ecfd12277b246b1937493c092.tar.bz2
mpv-079f67268f6f5a2ecfd12277b246b1937493c092.tar.xz
mp_image: don't reset pixel aspect with mp_image_set_size()
No reason to do so. See also commit 240ba92b. Since now many mp_images will never have a pixel aspect ratio set, redefine a 0/0 aspect ratio to "undefined" instead invalid. This also brings it more in line with how decoder vs. container aspect ratios are handled. Most callers seem to be fine with the new behavior. mp_image_params_valid() in particular has to be adjusted, or some things stop working due to mp_images not becoming valid after setting size and format.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/mp_image.h b/video/mp_image.h
index ef55dc5478..0a43093ecb 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -42,7 +42,7 @@ struct mp_image_params {
uint64_t hw_subfmt; // underlying format for some hwaccel pixfmts
// (will use the HW API's format identifiers)
int w, h; // image dimensions
- int p_w, p_h; // define pixel aspect ratio (never 0/0)
+ int p_w, p_h; // define pixel aspect ratio (undefined: 0/0)
enum mp_csp colorspace;
enum mp_csp_levels colorlevels;
enum mp_csp_prim primaries;