diff options
author | Marton Balint <cus@passwd.hu> | 2017-08-05 22:54:18 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2017-08-10 22:08:40 +0200 |
commit | 7004ac5eeb8e0715f8cd06ad2558ea52eacd6fba (patch) | |
tree | f24eff7f05eb84f996222d81defd3566a2faaab5 | |
parent | 493f637d1e933ebdd9f63528a7782d3617c442cb (diff) | |
download | ffmpeg-7004ac5eeb8e0715f8cd06ad2558ea52eacd6fba.tar.gz |
ffplay: add support for displaying rgb images with alpha
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | ffplay.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -957,7 +957,8 @@ static void video_image_display(VideoState *is) if (!vp->uploaded) { int sdl_pix_fmt = vp->frame->format == AV_PIX_FMT_YUV420P ? SDL_PIXELFORMAT_YV12 : SDL_PIXELFORMAT_ARGB8888; - if (realloc_texture(&is->vid_texture, sdl_pix_fmt, vp->frame->width, vp->frame->height, SDL_BLENDMODE_NONE, 0) < 0) + SDL_BlendMode sdl_blendmode = vp->frame->format == AV_PIX_FMT_YUV420P ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND; + if (realloc_texture(&is->vid_texture, sdl_pix_fmt, vp->frame->width, vp->frame->height, sdl_blendmode, 0) < 0) return; if (upload_texture(is->vid_texture, vp->frame, &is->img_convert_ctx) < 0) return; |