[FFmpeg-cvslog] avcodec/libdav1d: assert Dav1dPicture allocator_data is set before referencing its data

James Almer git at videolan.org
Mon May 27 18:56:04 EEST 2019


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon May 27 12:49:01 2019 -0300| [254da41531aa1959f129c95c122367bc743e6ba4] | committer: James Almer

avcodec/libdav1d: assert Dav1dPicture allocator_data is set before referencing its data

To ensure the custom allocator is effectively used.

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/libdav1d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 541d56dac8..a009870a61 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -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);



More information about the ffmpeg-cvslog mailing list