race condition in gstsubparse.c

bcxa sz bcxa.sz at gmail.com
Thu Oct 13 00:47:55 PDT 2011


Hi Developers,

This is what I observed when exercise srt subtitle on my embedded
system. But I thought it should also happen in pc.

The sympton is that:
frequently do forward seek and backward seek after sometimes, the
subtititle will not be displayed after one backward seek. And it will
display after the video comes to the last playback position before
this seek.

And with some debug, I found there are 2 issues:
1. race condition in self->segment
.. the self->segment will be written after push event_new_seek in
gst_sub_parse_src_event(). This will happen after FLUSH_STOP.
.. the self->segment also will be written in
handle_buffer()/gst_sub_parse_chain(). This also will happen after
FLUSH_STOP.

So it will have un-certain value of self->segment when push new
segement event to downstream in gst_sub_parse_chain().

2. during gstsubparse flush_start operation, it doesn't clear the
adapter. Then after flush stop, the older data (the data before seek)
can be pushed to downstream if the older data is in the segment)
before new data after seek.

Please let me know whether you agree. If yes, I will report to bugzilla.

best regards

BCXA


More information about the gstreamer-devel mailing list