Android bug (1)-HTML 5 playing streaming video causes getting stuck

Source: Internet
Author: User

This bug is inherent in Google. Like many Android problems, this is another problem that can be classified as multi-thread synchronization/state machine.

The problem lies in the handle of the asynchronous message of nuplayer. The symptoms and causes are not detailed. The bug is the biggest issue.
 
Replaying steps: Repeat and exit the HTML5 streaming media (the UA of the browser is set to the iPad mode, such as the Youku network and Baidu video to play the video), and the video will become stuck.
 
The reason for getting stuck is that during the initialization process at the beginning of the playing, press the return key and the nuplayerdriver will execute the reset operation and send a reset message to nuplayer, when you receive this message, nuplayer sends the kwhatflush message to acodec. Since component was in the loadedtoidlestate and has not yet run, it does not need to flush decoder. However, acodec must send kwhatflushcomplete messages to nuplayer. The above process can be completed successfully, otherwise, the upper-layer module will wait for the flush response.
 

Solution: Add a case in basestate in acodec and return a message up (the problem is very serious, but after knowing the cause, the solution is very simple, do you think of the German engineer's story ?)

Case kwhatflush: {sp <amessage> using Y = mcodec-> mnotify-> DUP (); Using Y-> setint32 ("what", acodec: kwhatflushcompleted ); policy-> post (); break ;}

This bug was also found on the booth of a well-known company that day. However, the reply they gave was due to the fact that I set UA to the iPad mode. After I changed it to Android, The Flash decoding process would be taken, there will be no problem. Oh, this is a paste. You can't make it like this ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.