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:
Simon Farnsworth 2015-01-27 16:25:21 +02:00 committed by Sreerenj Balachandran
parent 22d1acb6d2
commit bee7460f35

View file

@ -347,17 +347,14 @@ gst_vaapi_apply_composition (GstVaapiSurface * surface, GstBuffer * buffer)
#if GST_CHECK_VERSION(1,0,0)
GstVideoOverlayCompositionMeta *const cmeta =
gst_buffer_get_video_overlay_composition_meta (buffer);
GstVideoOverlayComposition *composition;
GstVideoOverlayComposition *composition = NULL;
if (!cmeta)
return TRUE;
composition = cmeta->overlay;
if (cmeta)
composition = cmeta->overlay;
#else
GstVideoOverlayComposition *const composition =
gst_video_buffer_get_overlay_composition (buffer);
#endif
if (!composition)
return TRUE;
return gst_vaapi_surface_set_subpictures_from_composition (surface,
composition, TRUE);
}