diff options
author | wm4 <wm4@nowhere> | 2015-11-17 15:22:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-17 15:22:47 +0100 |
commit | 25fe9e89e7db1658acac84ec8ac0a292b2e86165 (patch) | |
tree | 6c6a6e2e126459c623b56a03ee3a43c27732507d /video/out/opengl | |
parent | 0e0f07bbefeb429941ee422f1774010db5a13fca (diff) | |
download | mpv-25fe9e89e7db1658acac84ec8ac0a292b2e86165.tar.bz2 mpv-25fe9e89e7db1658acac84ec8ac0a292b2e86165.tar.xz |
vo_opengl: osx: error out if there is no IOSurface
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/hwdec_osx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_osx.c b/video/out/opengl/hwdec_osx.c index 7dd5a6edfa..84e8abca41 100644 --- a/video/out/opengl/hwdec_osx.c +++ b/video/out/opengl/hwdec_osx.c @@ -169,6 +169,10 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image, p->pbuf = (CVPixelBufferRef)hw_image->planes[3]; CVPixelBufferRetain(p->pbuf); IOSurfaceRef surface = CVPixelBufferGetIOSurface(p->pbuf); + if (!surface) { + MP_ERR(hw, "CVPixelBuffer has no IOSurface\n"); + return -1; + } uint32_t cvpixfmt = CVPixelBufferGetPixelFormatType(p->pbuf); struct vt_format *f = vt_get_gl_format(cvpixfmt); |