mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
textrender: Correctly initialize the background for ARGB too
This commit is contained in:
parent
204c327b23
commit
1d4ba53259
1 changed files with 10 additions and 4 deletions
|
@ -470,11 +470,17 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
|
|||
gst_buffer_copy_metadata (outbuf, inbuf, GST_BUFFER_COPY_TIMESTAMPS);
|
||||
data = GST_BUFFER_DATA (outbuf);
|
||||
|
||||
if (render->use_ARGB) {
|
||||
for (n = 0; n < render->width * render->height; n++) {
|
||||
data[n * 4] = 0;
|
||||
data[n * 4 + 1] = 0;
|
||||
data[n * 4 + 1] = data[n * 4 + 2] = data[n * 4 + 3] = 0;
|
||||
}
|
||||
} else {
|
||||
for (n = 0; n < render->width * render->height; n++) {
|
||||
data[n * 4] = data[n * 4 + 1] = 0;
|
||||
data[n * 4 + 2] = data[n * 4 + 3] = 128;
|
||||
}
|
||||
}
|
||||
|
||||
switch (render->halign) {
|
||||
case GST_TEXT_RENDER_HALIGN_LEFT:
|
||||
|
|
Loading…
Reference in a new issue