forked from FFmpeg/FFmpeg
lavfi: add braces around the block of an if() expression in avfilter_default_get_video_buffer
Clarify code layout.
This commit is contained in:
parent
0ff5cbedd2
commit
6f1dd6f45a
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,8 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per
|
||||||
AVFilterBufferRef *picref = NULL;
|
AVFilterBufferRef *picref = NULL;
|
||||||
AVFilterPool *pool = link->pool;
|
AVFilterPool *pool = link->pool;
|
||||||
|
|
||||||
if (pool) for (i = 0; i < POOL_SIZE; i++) {
|
if (pool) {
|
||||||
|
for (i = 0; i < POOL_SIZE; i++) {
|
||||||
picref = pool->pic[i];
|
picref = pool->pic[i];
|
||||||
if (picref && picref->buf->format == link->format && picref->buf->w == w && picref->buf->h == h) {
|
if (picref && picref->buf->format == link->format && picref->buf->w == w && picref->buf->h == h) {
|
||||||
AVFilterBuffer *pic = picref->buf;
|
AVFilterBuffer *pic = picref->buf;
|
||||||
|
@ -57,6 +58,7 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per
|
||||||
memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize));
|
memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize));
|
||||||
return picref;
|
return picref;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
pool = link->pool = av_mallocz(sizeof(AVFilterPool));
|
pool = link->pool = av_mallocz(sizeof(AVFilterPool));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue