[vlc-commits] display: ignore sample aspect ratio change failure

Rémi Denis-Courmont git at videolan.org
Sat Sep 2 19:22:47 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 10 18:16:42 2017 +0300| [364a4dda77c89b329cc2354fee6c2a47e599bea4] | committer: Rémi Denis-Courmont

display: ignore sample aspect ratio change failure

If display size change can require a resize without failure, then
changing the aspect ratio also ought to work.

In any case, the core never really did anything on failure.
In particular, it could not prevent the value change of the video
output variable, and did not perform any scaling.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=364a4dda77c89b329cc2354fee6c2a47e599bea4
---

 src/video_output/display.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index da7dcc8674..23b71e1c6d 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -885,9 +885,6 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
 #endif
         /* */
         if (osys->ch_sar) {
-            unsigned int i_sar_num = vd->source.i_sar_num;
-            unsigned int i_sar_den = vd->source.i_sar_den;
-
             if (osys->sar.num > 0 && osys->sar.den > 0) {
                 vd->source.i_sar_num = osys->sar.num;
                 vd->source.i_sar_den = osys->sar.den;
@@ -896,18 +893,9 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
                 vd->source.i_sar_den = osys->source.i_sar_den;
             }
 
-            if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT)) {
-                /* There nothing much we can do. The only reason a vout display
-                 * does not support it is because it need the core to add black border
-                 * to the video for it.
-                 * TODO add black borders ?
-                 */
-                msg_Err(vd, "Failed to change source AR");
-                vd->source.i_sar_num = i_sar_num;
-                vd->source.i_sar_den = i_sar_den;
-            } else if (!osys->fit_window) {
+            vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT);
+            if (!osys->fit_window)
                 osys->fit_window = 1;
-            }
             osys->sar.num = vd->source.i_sar_num;
             osys->sar.den = vd->source.i_sar_den;
             osys->ch_sar  = false;



More information about the vlc-commits mailing list