]> git.sesse.net Git - vlc/blobdiff - src/input/decoder.c
* modules/demux/mp4/mp4.c, src/input/decoder.c: support for cropping in quicktime...
[vlc] / src / input / decoder.c
index 1a02901d0841b9053272dc92521abd1123019bd1..df510c276c25f46acc2d7e4990ee7fc638c1e2ea 100644 (file)
@@ -951,10 +951,21 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
         if( !p_dec->fmt_out.video.i_visible_width ||
             !p_dec->fmt_out.video.i_visible_height )
         {
-            p_dec->fmt_out.video.i_visible_width =
-                p_dec->fmt_out.video.i_width;
-            p_dec->fmt_out.video.i_visible_height =
-                p_dec->fmt_out.video.i_height;
+            if( p_dec->fmt_in.video.i_visible_width &&
+                p_dec->fmt_in.video.i_visible_height )
+            {
+                p_dec->fmt_out.video.i_visible_width =
+                    p_dec->fmt_in.video.i_visible_width;
+                p_dec->fmt_out.video.i_visible_height =
+                    p_dec->fmt_in.video.i_visible_height;
+            }
+            else
+            {
+                p_dec->fmt_out.video.i_visible_width =
+                    p_dec->fmt_out.video.i_width;
+                p_dec->fmt_out.video.i_visible_height =
+                    p_dec->fmt_out.video.i_height;
+            }
         }
 
         if( p_dec->fmt_out.video.i_visible_height == 1088 &&