diff options
author | wm4 <wm4@nowhere> | 2017-07-21 20:19:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-07-21 20:19:39 +0200 |
commit | 2378acc3b3e9825765c549e025bc1ca83064cced (patch) | |
tree | 186f115fad588eeccec369690cbd594788f8331a /video/decode | |
parent | 533ff28574ef179524a1f25b0b145d92137457a7 (diff) | |
download | mpv-2378acc3b3e9825765c549e025bc1ca83064cced.tar.bz2 mpv-2378acc3b3e9825765c549e025bc1ca83064cced.tar.xz |
options: drop --video-aspect-method=hybrid
Remove this code because it could be argued that it contains GPL-only
code (see commit 642e963c860 for details).
The remaining aspect methods appear to work just as well, are
potentially more compatible to other players, and the code becomes much
simpler.
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/dec_video.c | 31 | ||||
-rw-r--r-- | video/decode/dec_video.h | 1 |
2 files changed, 3 insertions, 29 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index c98ab2b8b7..b1afdf3a18 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -205,35 +205,10 @@ static void fix_image_params(struct dec_video *d_video, // While mp_image_params normally always have to have d_w/d_h set, the // decoder signals unknown bitstream aspect ratio with both set to 0. - float dec_aspect = p.p_w > 0 && p.p_h > 0 ? p.p_w / (float)p.p_h : 0; - -#if HAVE_GPL - if (d_video->initial_decoder_aspect == 0) - d_video->initial_decoder_aspect = dec_aspect; -#endif - bool use_container = true; - switch (opts->aspect_method) { - case 0: -#if HAVE_GPL - // We normally prefer the container aspect, unless the decoder aspect - // changes at least once. - if (dec_aspect > 0 && d_video->initial_decoder_aspect != dec_aspect) { - MP_VERBOSE(d_video, "Using bitstream aspect ratio.\n"); - // Even if the aspect switches back, don't use container aspect again. - d_video->initial_decoder_aspect = -1; - use_container = false; - } - break; -#else - /* fall through, behave as "bitstream" */ -#endif - case 1: - if (dec_aspect) { - MP_VERBOSE(d_video, "Using bitstream aspect ratio.\n"); - use_container = false; - } - break; + if (opts->aspect_method == 1 && p.p_w > 0 && p.p_h > 0) { + MP_VERBOSE(d_video, "Using bitstream aspect ratio.\n"); + use_container = false; } if (use_container && c->par_w > 0 && c->par_h) { diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h index 8d1936e016..261f47fca8 100644 --- a/video/decode/dec_video.h +++ b/video/decode/dec_video.h @@ -72,7 +72,6 @@ struct dec_video { double decoded_pts; struct mp_image_params dec_format, last_format, fixed_format; - float initial_decoder_aspect; double start_pts; double start, end; |