mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-15 20:01:42 +00:00
ffmpeg: assert against creation of cycles in the pools linked list.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
be2b927a6f
commit
cf09496cf9
3
ffmpeg.c
3
ffmpeg.c
@ -599,6 +599,9 @@ static void unref_buffer(InputStream *ist, FrameBuffer *buf)
|
||||
av_assert0(buf->refcount > 0);
|
||||
buf->refcount--;
|
||||
if (!buf->refcount) {
|
||||
FrameBuffer *tmp;
|
||||
for(tmp= ist->buffer_pool; tmp; tmp= tmp->next)
|
||||
av_assert1(tmp != buf);
|
||||
buf->next = ist->buffer_pool;
|
||||
ist->buffer_pool = buf;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user