avcodec/libdav1d: assert Dav1dPicture allocator_data is set before referencing its...
authorJames Almer <jamrial@gmail.com>
Mon, 27 May 2019 15:49:01 +0000 (12:49 -0300)
committerJames Almer <jamrial@gmail.com>
Mon, 27 May 2019 15:49:01 +0000 (12:49 -0300)
To ensure the custom allocator is effectively used.

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/libdav1d.c

index 541d56d..a009870 100644 (file)
@@ -206,7 +206,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
         return res;
     }
 
-    av_assert0(p->data[0] != NULL);
+    av_assert0(p->data[0] && p->allocator_data);
 
     // This requires the custom allocator above
     frame->buf[0] = av_buffer_ref(p->allocator_data);