mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
dvbsuboverlay: Implement fallback page_time_out honoring
The spec has a page_time_out in the page composition segment to ensure subtitles don't get stuck on screen for too much longer than intended, when future page composition segments get lost on bad reception, or other problems. Honor it in the gst plugin side.
This commit is contained in:
parent
3d09a3b18a
commit
84b52f6eb4
1 changed files with 12 additions and 0 deletions
|
@ -1118,6 +1118,18 @@ gst_dvbsub_overlay_chain_video (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
}
|
||||
|
||||
/* Check that we haven't hit the fallback timeout for current subtitle page */
|
||||
if (overlay->current_subtitle
|
||||
&& vid_running_time >
|
||||
(overlay->current_subtitle->pts +
|
||||
(overlay->current_subtitle->page_time_out * GST_SECOND))) {
|
||||
GST_INFO_OBJECT (overlay,
|
||||
"Subtitle page not redefined before fallback page_time_out of %u seconds (missed data?) - deleting current page",
|
||||
overlay->current_subtitle->page_time_out);
|
||||
dvb_subtitles_free (overlay->current_subtitle);
|
||||
overlay->current_subtitle = NULL;
|
||||
}
|
||||
|
||||
ret = gst_pad_push (overlay->srcpad, buffer);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue