Skip to content

Commit 66f60e1

Browse files
alexandre-janniauxfkuehne
authored andcommitted
image: merge if() condition and assert
The if block is only used to trigger the assert now, so merge it into the assert itself.
1 parent 49a1f11 commit 66f60e1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/misc/image.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,7 @@ static block_t *ImageWrite( image_handler_t *p_image, picture_t *p_pic,
446446
/* Hold the picture there to let the caller release its own picture,
447447
* since filters will consume the picture. */
448448
p_pic = p_image->p_converter->ops->filter_video( p_image->p_converter, p_pic );
449-
450-
if( likely(p_pic != NULL) )
451-
{
452-
assert(!picture_HasChainedPics(p_pic)); // no chaining
453-
}
449+
assert(p_pic == NULL || !picture_HasChainedPics(p_pic)); // no chaining
454450
}
455451

456452
block_t *p_block = NULL;

0 commit comments

Comments
 (0)