mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +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,10 +470,16 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
|
|||
gst_buffer_copy_metadata (outbuf, inbuf, GST_BUFFER_COPY_TIMESTAMPS);
|
||||
data = GST_BUFFER_DATA (outbuf);
|
||||
|
||||
for (n = 0; n < render->width * render->height; n++) {
|
||||
data[n * 4] = 0;
|
||||
data[n * 4 + 1] = 0;
|
||||
data[n * 4 + 2] = data[n * 4 + 3] = 128;
|
||||
if (render->use_ARGB) {
|
||||
for (n = 0; n < render->width * render->height; n++) {
|
||||
data[n * 4] = 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) {
|
||||
|
|
Loading…
Reference in a new issue