decoder: check visible size when creating buffer
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 29 Jun 2017 09:09:02 +0000 (11:09 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 5 Sep 2017 17:37:57 +0000 (18:37 +0100)
early reject invalid visible size
mishandled by filters.

refs #18467

Gbp-Pq: Name 0012-decoder-check-visible-size-when-creating-buffer.patch

src/input/decoder.c

index 9f7dc18900d8e584923954f33095c0b6e42712d2..cfc15ed984c0b8e79fb8444e7df514f70a871524 100644 (file)
@@ -2060,7 +2060,9 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
         vout_thread_t *p_vout;
 
         if( !p_dec->fmt_out.video.i_width ||
-            !p_dec->fmt_out.video.i_height )
+            !p_dec->fmt_out.video.i_height ||
+            p_dec->fmt_out.video.i_width < p_dec->fmt_out.video.i_visible_width ||
+            p_dec->fmt_out.video.i_height < p_dec->fmt_out.video.i_visible_height )
         {
             /* Can't create a new vout without display size */
             return NULL;