1. Related PTS to file idx and check hashed code
1.1 Due to the start File Index problem, the decoder now only supports one program
2. Timeout mechanism:
2.1 Decoder, ffmpeg open codec shall register a timeout instead of waiting
Solved through reading the following link:
http://www.cnblogs.com/wainiwann/p/4218341.html
However, it seems that the time space will depend on the incoming source format,
some in second
some in microseconds
2.1 Encoder, encoding shall register a timeout instead of waiting