From: Sebastian Dröge Date: Thu, 25 Oct 2012 10:06:15 +0000 (+0200) Subject: assrender: Handle GAP events X-Git-Tag: 1.19.3~507^2~14490 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4dd39a3856fd1f4c54d0c9f0dfdd26ae76ed9373;p=platform%2Fupstream%2Fgstreamer.git assrender: Handle GAP events --- diff --git a/ext/assrender/gstassrender.c b/ext/assrender/gstassrender.c index 233733b061..b471b87e14 100644 --- a/ext/assrender/gstassrender.c +++ b/ext/assrender/gstassrender.c @@ -1540,6 +1540,23 @@ gst_ass_render_event_text (GstPad * pad, GstObject * parent, GstEvent * event) GST_ASS_RENDER_UNLOCK (render); break; } + case GST_EVENT_GAP:{ + GstClockTime start, duration; + + gst_event_parse_gap (event, &start, &duration); + if (GST_CLOCK_TIME_IS_VALID (duration)) + start += duration; + /* we do not expect another buffer until after gap, + * so that is our position now */ + GST_ASS_RENDER_LOCK (render); + render->subtitle_segment.position = start; + + /* wake up the video chain, it might be waiting for a text buffer or + * a text segment update */ + GST_ASS_RENDER_BROADCAST (render); + GST_ASS_RENDER_UNLOCK (render); + break; + } case GST_EVENT_FLUSH_STOP: GST_ASS_RENDER_LOCK (render); GST_INFO_OBJECT (render, "text flush stop");