Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-22 22:07:04 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-04-22 22:07:04 +0400
commitcf09496cf996d21cc718eb0ac0bdf5f0e96d581e (patch)
treed5d17b4fa2d8a8af2802e09037699b4b3bb89a9b /ffmpeg.c
parentbe2b927a6f5311cd5dbf25bd34a029c5d376d9cd (diff)
ffmpeg: assert against creation of cycles in the pools linked list.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-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;
}