mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
pluginutil: Fix clearing of subtitle overlay
dvbsuboverlay signals no subtitles present by not setting GstVideoOverlayCompositionMeta on a buffer. Detect this, and remove subtitles whenever we have no overlay composition to hand. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
This commit is contained in:
parent
22d1acb6d2
commit
bee7460f35
1 changed files with 3 additions and 6 deletions
|
@ -347,17 +347,14 @@ gst_vaapi_apply_composition (GstVaapiSurface * surface, GstBuffer * buffer)
|
||||||
#if GST_CHECK_VERSION(1,0,0)
|
#if GST_CHECK_VERSION(1,0,0)
|
||||||
GstVideoOverlayCompositionMeta *const cmeta =
|
GstVideoOverlayCompositionMeta *const cmeta =
|
||||||
gst_buffer_get_video_overlay_composition_meta (buffer);
|
gst_buffer_get_video_overlay_composition_meta (buffer);
|
||||||
GstVideoOverlayComposition *composition;
|
GstVideoOverlayComposition *composition = NULL;
|
||||||
|
|
||||||
if (!cmeta)
|
if (cmeta)
|
||||||
return TRUE;
|
composition = cmeta->overlay;
|
||||||
composition = cmeta->overlay;
|
|
||||||
#else
|
#else
|
||||||
GstVideoOverlayComposition *const composition =
|
GstVideoOverlayComposition *const composition =
|
||||||
gst_video_buffer_get_overlay_composition (buffer);
|
gst_video_buffer_get_overlay_composition (buffer);
|
||||||
#endif
|
#endif
|
||||||
if (!composition)
|
|
||||||
return TRUE;
|
|
||||||
return gst_vaapi_surface_set_subpictures_from_composition (surface,
|
return gst_vaapi_surface_set_subpictures_from_composition (surface,
|
||||||
composition, TRUE);
|
composition, TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue