diff libvo/vo_bl.c @ 36509:eeb86b142fa7

vo_bl: minor simplification of size reinit case.
author reimar
date Sat, 18 Jan 2014 13:46:54 +0000
parents 449868d26489
children 18ee133ba2f5
line wrap: on
line diff
--- a/libvo/vo_bl.c	Sat Jan 18 13:43:10 2014 +0000
+++ b/libvo/vo_bl.c	Sat Jan 18 13:46:54 2014 +0000
@@ -234,20 +234,15 @@
 	int reset_height = bl->height < 0;
 
 	/* adapt size of Blinkenlights UDP stream to size of movie */
-	if (reset_width || reset_height) {
-		if (reset_width) { /* use width of movie */
-			bl->width = width;
-		}
-		if (reset_height) { /* use height of movie */
-			bl->height = height;
-		}
+	if (reset_width) bl->width = width; /* use width of movie */
+	if (reset_height) bl->height = height; /* use height of movie */
+
 		/* check for maximum size of UDP packet */
 		if (12 + bl->width*bl->height*bl->channels > 65507) {
 			mp_msg(MSGT_VO, MSGL_ERR, "bl: %dx%d-%d does not fit into an UDP packet\n",
 					bl->width, bl->height, bl->channels);
 			goto err_out;
 		}
-	}
 
 		/* resize or allocate frame and tmp buffers */
 		bl_size = 12 + bl->width*bl->height*bl->channels;