OSDN Git Service

ffmpeg: assert the refcount of allocated frames,
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Apr 2012 18:08:00 +0000 (20:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Apr 2012 18:08:56 +0000 (20:08 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 567edd3..ab1b7e8 100644 (file)
--- 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;