# HG changeset patch # User reimar # Date 1390052958 0 # Node ID 18ee133ba2f56d6d7b6414aef98862f0bcb3d988 # Parent eeb86b142fa7cb9a854a128be79fd2e4ff211493 vo_bl: cosmetics, reindent. diff -r eeb86b142fa7 -r 18ee133ba2f5 libvo/vo_bl.c --- a/libvo/vo_bl.c Sat Jan 18 13:46:54 2014 +0000 +++ b/libvo/vo_bl.c Sat Jan 18 13:49:18 2014 +0000 @@ -237,30 +237,29 @@ 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; - } + /* 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; - ptr = realloc(bl_packet, 12 + bl->width*bl->height*3); /* space for header and image data */ - if (ptr) - bl_packet = ptr; - else { - mp_msg(MSGT_VO, MSGL_ERR, "bl: out of memory error\n"); - goto err_out; - } - image = ((unsigned char*)bl_packet + 12); /* pointer to image data */ - ptr = realloc(tmp, bl->width*bl->height*3); /* space for image data only */ - if (ptr) - tmp = ptr; - else { - mp_msg(MSGT_VO, MSGL_ERR, "bl: out of memory error\n"); - goto err_out; - } + /* resize or allocate frame and tmp buffers */ + bl_size = 12 + bl->width*bl->height*bl->channels; + ptr = realloc(bl_packet, 12 + bl->width*bl->height*3); /* space for header and image data */ + if (!ptr) { + mp_msg(MSGT_VO, MSGL_ERR, "bl: out of memory error\n"); + goto err_out; + } + bl_packet = ptr; + + image = ((unsigned char*)bl_packet + 12); /* pointer to image data */ + ptr = realloc(tmp, bl->width*bl->height*3); /* space for image data only */ + if (!ptr) { + mp_msg(MSGT_VO, MSGL_ERR, "bl: out of memory error\n"); + goto err_out; + } + tmp = ptr; bl_packet->magic = htonl(0x23542666); bl_packet->width = htons(bl->width);