aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-22 20:07:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-22 20:07:04 +0200
commitcf09496cf996d21cc718eb0ac0bdf5f0e96d581e (patch)
treed5d17b4fa2d8a8af2802e09037699b4b3bb89a9b
parentbe2b927a6f5311cd5dbf25bd34a029c5d376d9cd (diff)
downloadffmpeg-cf09496cf996d21cc718eb0ac0bdf5f0e96d581e.tar.gz
ffmpeg: assert against creation of cycles in the pools linked list.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index dc318d134f..567edd3eb7 100644
--- a/ffmpeg.c
+++ b/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;
}