[vlc-commits] avcodec: add an assertion

Rémi Denis-Courmont git at videolan.org
Sun Dec 30 18:49:16 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 29 11:59:24 2018 +0200| [16bdfa8a7ede2414c929460f1ec87e8e482dd402] | committer: Rémi Denis-Courmont

avcodec: add an assertion

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16bdfa8a7ede2414c929460f1ec87e8e482dd402
---

 modules/codec/avcodec/video.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 3026acf185..e0909012c7 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1550,6 +1550,7 @@ static int lavc_dr_GetFrame(struct AVCodecContext *ctx, AVFrame *frame)
 
     frame->opaque = pic;
     /* The loop above held one reference to the picture for each plane. */
+    assert(pic->i_planes > 0);
     picture_Release(pic);
     return 0;
 error:



More information about the vlc-commits mailing list