diff options
author | wm4 <wm4@nowhere> | 2012-10-19 19:11:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-24 21:56:34 +0200 |
commit | a4f9077f6c1a897120616cc70c1ca37c6a247be2 (patch) | |
tree | 613c8f7979171f759372abd7869c5ddfe4d9a21b /sub/draw_bmp.c | |
parent | bf68634d15c747fd05f118b1bd95e3017c1eb6bb (diff) | |
download | mpv-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.c | 3 |
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); |