summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-21 20:19:39 +0200
committerwm4 <wm4@nowhere>2017-07-21 20:19:39 +0200
commit2378acc3b3e9825765c549e025bc1ca83064cced (patch)
tree186f115fad588eeccec369690cbd594788f8331a /video/decode/dec_video.c
parent533ff28574ef179524a1f25b0b145d92137457a7 (diff)
downloadmpv-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/dec_video.c')
-rw-r--r--video/decode/dec_video.c31
1 files changed, 3 insertions, 28 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) {