GNOME Bugzilla – Bug 747499
playsink: set async to false for a customed text-sink will cause sync problem when seeking
Last modified: 2018-05-01 07:05:46 UTC
Created attachment 301119 [details] [review] gstplaysink: don't set async of custom text-sink to false set async to false for a custom text-sink will lead to sync problem when seeking. eg. we use appsink to catch text and use UI to render those text. if set async to false, after seeking, the text and video are not sync. I think the preroll need use GAP event instead of setting async to false for text sink.
Comment on attachment 301119 [details] [review] gstplaysink: don't set async of custom text-sink to false The problem here is that text streams are sparse, so it might take a long time until the first subtitle is received and the sink prerolls.
in my understanding, the GAP event can be used to solve the sink prerolls problem.if there is no text, parser should send GAP event to tell sink. if set async to false. a custom text-sink will cause sync problem after seeking. subtitle will come out quickly and earlier than the video after seeking.
> If set async to false. a custom text-sink will cause > sync problem after seeking. Subtitle will come out > quickly and earlier than the video after seeking. But why? You should be able to use async=false sync=true in which case the subtitles should still be rendered in sync with the video/audio.
in my case, I use app-sink to get the subtitle text and text was rendered by UI. I didn't perform sync in UI, that means the sync will reply on app-sink, once app-sink sent me a text, UI will renders it immediately. I found that if async=false, then after seeking, app-sink will get subtitle text earlier than video.
Is this with sync=true on the sink? It shouldn't really get subs earlier then unless the video sink gets video too late.
No answers in 3 years. Closing. Please re-open if you can reproduce the issue with current stable GStreamer.