Skip to content

Commit 9b7439c

Browse files
committed
swscale: don't pointlessly loop over NULL buffers
This array is defined as contiguous. Signed-off-by: Niklas Haas <[email protected]>
1 parent dd75b6b commit 9b7439c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libswscale/swscale.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ static int frame_ref(AVFrame *dst, const AVFrame *src)
13351335
/* ref the buffers */
13361336
for (int i = 0; i < FF_ARRAY_ELEMS(src->buf); i++) {
13371337
if (!src->buf[i])
1338-
continue;
1338+
break;
13391339
dst->buf[i] = av_buffer_ref(src->buf[i]);
13401340
if (!dst->buf[i])
13411341
return AVERROR(ENOMEM);

0 commit comments

Comments
 (0)