]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avfilter.c
get_buffers: Check that pix_fmt is not NONE.
[ffmpeg] / libavfilter / avfilter.c
index 6e958e714172fe8aed4f8c3b525eb804f0b8c51a..706f7e26944d6d912c7d21f0881fbab54085531a 100644 (file)
@@ -92,6 +92,7 @@ static void free_pool(AVFilterPool *pool)
             AVFilterBufferRef *picref = pool->pic[i];
             /* free buffer: picrefs stored in the pool are not
              * supposed to contain a free callback */
+            av_assert0(!picref->buf->refcount);
             av_freep(&picref->buf->data[0]);
             av_freep(&picref->buf);
 
@@ -146,6 +147,7 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref)
 {
     if (!ref)
         return;
+    av_assert0(ref->buf->refcount > 0);
     if (!(--ref->buf->refcount)) {
         if (!ref->buf->free) {
             store_in_pool(ref);