mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
basetextoverlay: Append our rectangle to the upstream composition, not the other way around
Upstream is supposed to be painted first, and only then our rectangle.
This commit is contained in:
parent
e9579466a3
commit
1d271f9a15
1 changed files with 8 additions and 16 deletions
|
@ -1668,25 +1668,17 @@ gst_base_text_overlay_set_composition (GstBaseTextOverlay * overlay)
|
|||
if (overlay->composition)
|
||||
gst_video_overlay_composition_unref (overlay->composition);
|
||||
|
||||
overlay->composition = gst_video_overlay_composition_new (rectangle);
|
||||
gst_video_overlay_rectangle_unref (rectangle);
|
||||
|
||||
if (overlay->upstream_composition) {
|
||||
guint num_overlays =
|
||||
gst_video_overlay_composition_n_rectangles
|
||||
(overlay->upstream_composition);
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < num_overlays; i++) {
|
||||
GstVideoOverlayRectangle *rectangle;
|
||||
rectangle =
|
||||
gst_video_overlay_composition_get_rectangle
|
||||
(overlay->upstream_composition, i);
|
||||
gst_video_overlay_composition_add_rectangle (overlay->composition,
|
||||
rectangle);
|
||||
}
|
||||
overlay->composition =
|
||||
gst_video_overlay_composition_copy (overlay->upstream_composition);
|
||||
gst_video_overlay_composition_add_rectangle (overlay->composition,
|
||||
rectangle);
|
||||
} else {
|
||||
overlay->composition = gst_video_overlay_composition_new (rectangle);
|
||||
}
|
||||
|
||||
gst_video_overlay_rectangle_unref (rectangle);
|
||||
|
||||
} else if (overlay->composition) {
|
||||
gst_video_overlay_composition_unref (overlay->composition);
|
||||
overlay->composition = NULL;
|
||||
|
|
Loading…
Reference in a new issue