[vlc-commits] avcodec: va: assert sooner when the data are not right

Steve Lhomme git at videolan.org
Tue Nov 29 17:46:52 CET 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Nov 29 14:19:36 2016 +0100| [c1aa56aa09e7de492e1a94f5b0bfd985d90f6edf] | committer: Rémi Denis-Courmont

avcodec: va: assert sooner when the data are not right

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

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

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 699e6b3..0c70800 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1126,6 +1126,7 @@ static int lavc_va_GetFrame(struct AVCodecContext *ctx, AVFrame *frame,
         picture_Release(pic);
         return -1;
     }
+    assert(frame->data[0] != NULL);
     /* data[0] must be non-NULL for libavcodec internal checks.
      * data[3] actually contains the format-specific surface handle. */
     frame->data[3] = frame->data[0];
@@ -1142,7 +1143,6 @@ static int lavc_va_GetFrame(struct AVCodecContext *ctx, AVFrame *frame,
     }
 
     frame->opaque = pic;
-    assert(frame->data[0] != NULL);
     return 0;
 }
 



More information about the vlc-commits mailing list