summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/hwdec.c')
-rw-r--r--video/out/opengl/hwdec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c
index 7d47e152b5..261931a8d4 100644
--- a/video/out/opengl/hwdec.c
+++ b/video/out/opengl/hwdec.c
@@ -116,3 +116,12 @@ void gl_hwdec_uninit(struct gl_hwdec *hwdec)
hwdec->driver->destroy(hwdec);
talloc_free(hwdec);
}
+
+bool gl_hwdec_test_format(struct gl_hwdec *hwdec, int imgfmt)
+{
+ if (!imgfmt)
+ return false;
+ if (hwdec->driver->test_format)
+ return hwdec->driver->test_format(hwdec, imgfmt);
+ return hwdec->driver->imgfmt == imgfmt;
+}