summaryrefslogtreecommitdiffstats
path: root/sub/draw_bmp.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-19 19:11:58 +0200
committerwm4 <wm4@nowhere>2012-10-24 21:56:34 +0200
commita4f9077f6c1a897120616cc70c1ca37c6a247be2 (patch)
tree613c8f7979171f759372abd7869c5ddfe4d9a21b /sub/draw_bmp.c
parentbf68634d15c747fd05f118b1bd95e3017c1eb6bb (diff)
downloadmpv-a4f9077f6c1a897120616cc70c1ca37c6a247be2.tar.bz2
mpv-a4f9077f6c1a897120616cc70c1ca37c6a247be2.tar.xz
draw_bmp: don't try to call swscale if image format not supported
If that happens, we silently fail.
Diffstat (limited to 'sub/draw_bmp.c')
-rw-r--r--sub/draw_bmp.c3
1 files changed, 3 insertions, 0 deletions
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);