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:
Mart Raudsepp 2010-12-01 07:06:35 +02:00 committed by Edward Hervey
parent 3d09a3b18a
commit 84b52f6eb4

View file

@ -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;