[FFmpeg-cvslog] vf_drawtext: select YUV color for drawbox() in case YUV colorspace is used

Stefano Sabatini git at videolan.org
Wed Jan 4 00:41:38 CET 2012


ffmpeg | branch: release/0.9 | Stefano Sabatini <stefasab at gmail.com> | Sat Dec 24 16:17:18 2011 +0100| [103cb461b0fad88dd48a0234e0e0609825e85caa] | committer: Stefano Sabatini

vf_drawtext: select YUV color for drawbox() in case YUV colorspace is used

Fix box alpha rendering when a YUV colorspace is selected, in particular
fix trac ticket #763.
(cherry picked from commit 1858a5c25ee1ccb8089339d20138116a46cc6c77)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=103cb461b0fad88dd48a0234e0e0609825e85caa
---

 libavfilter/vf_drawtext.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 912a854..bf43ea9 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -805,7 +805,7 @@ static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
     /* draw box */
     if (dtext->draw_box)
         drawbox(picref, dtext->x, dtext->y, box_w, box_h,
-                dtext->box_line, dtext->pixel_step, dtext->boxcolor_rgba,
+                dtext->box_line, dtext->pixel_step, dtext->is_packed_rgb ? dtext->boxcolor_rgba : dtext->boxcolor,
                 dtext->hsub, dtext->vsub, dtext->is_packed_rgb, dtext->rgba_map);
 
     if (dtext->shadowx || dtext->shadowy) {



More information about the ffmpeg-cvslog mailing list