Thanks for sharing such information. Working with our threadeddemuxer expert, we have a summary on threadeddemuxer usage. I also copy here. Hopt it would be helpful for other users.
1)Before calling SetTimePosition()/SetRate(), users should call Stop() functions first. In the current release, the threadeddemuxer will call stop() in SetTimePosition()/SetRate() functions themselves, but we still suggest that user call stop() first for future release consistency.
2)After calling SetTimePosition()/SetRate() functions, users should call run() functions. run() method will start splitting the stream from the new place. Without such functions call, user may get "UMC_ERR_NOT_ENOUGH_DATA" error message when they call GetNextData() functions.
3) For some bit streams, after calling SetTimePosition()/SetRate(), users may get "UMC_ERR_END_OF_STREAM" errors when they try to get next portion of data. In many cases, that is because there is only ONE sequence header in the video stream (or only one SPS/PPS for H.264 video). SetTimePosition()/SetRate() will make the splitter go to some random point of video stream. The following run() function call will try to locate and parse the next sequence header before start to construct frames. Because there is only one sequence header (or SPS/PPS headers) at the beginning of the video, run() function will make the splitter go the end of the stream without finding further data. So calling GetNextData() will get UMC_ERR_END_OF_STREAM error message. The ThreadedDemuxer request the bit stream has multiple sequence headers if the video can be randomly accessed by SetTimePosition() or SetRate() functions calls