Patchwork ffmpeg: assert the refcount of allocated frames,

login
register
mail settings
Submitter Michael Niedermayer
Date April 22, 2012, 6:26 p.m.
Message ID <20120422182654.66A52148406@albiero.videolan.org>
Download mbox | patch
Permalink /patch/20728/
State New
Headers show

Comments

Michael Niedermayer - April 22, 2012, 6:26 p.m.
ffmpeg | branch: master | Michael Niedermayer <michaelni@gmx.at> | Sun Apr 22 20:08:00 2012 +0200| [22a6a23a45b425fc510ee0034a0cb0e3c73551bd] | committer: Michael Niedermayer

ffmpeg: assert the refcount of allocated frames,

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

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

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

Patch

diff --git a/ffmpeg.c b/ffmpeg.c
index 567edd3..ab1b7e8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -628,6 +628,7 @@  static int codec_get_buffer(AVCodecContext *s, AVFrame *frame)
         if ((ret = alloc_buffer(ist, s, &buf)) < 0)
             return ret;
     }
+    av_assert0(!buf->refcount);
     buf->refcount++;
 
     frame->opaque        = buf;