[FFmpeg-cvslog] ffmpeg: assert against creation of cycles in the pools linked list.

Michael Niedermayer git at videolan.org
Sun Apr 22 20:26:54 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 22 20:07:04 2012 +0200| [cf09496cf996d21cc718eb0ac0bdf5f0e96d581e] | committer: Michael Niedermayer

ffmpeg: assert against creation of cycles in the pools linked list.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf09496cf996d21cc718eb0ac0bdf5f0e96d581e
---

 ffmpeg.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index dc318d1..567edd3 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;
     }



More information about the ffmpeg-cvslog mailing list