From a4f9077f6c1a897120616cc70c1ca37c6a247be2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 19 Oct 2012 19:11:58 +0200 Subject: draw_bmp: don't try to call swscale if image format not supported If that happens, we silently fail. --- sub/draw_bmp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sub/draw_bmp.c') diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index 315e52dfdd..9945a8fc89 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -464,6 +464,9 @@ void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, float yuv2rgb[3][4]; float rgb2yuv[3][4]; + if (!mp_sws_supported_format(dst->imgfmt)) + return; + if (cache && !*cache) *cache = talloc_zero(NULL, struct mp_draw_sub_cache); -- cgit v1.2.3