• acolwell@chromium.org's avatar
    Fix various MediaSource related crashes on Android. · 34e4b51c
    acolwell@chromium.org authored
    This change fixes several issues that were causing crashes.
    - MediaPlayerHostMsg_DemuxerReady_Params was not initializing the xxx_codec
    member variables so audio-only or video-only content would randomly be
    flagged as A/V content with a random codec ID.
    - ChunkDemuxer::Stop() was not being called which could cause the delegate
    to be accessed after it was destroyed.
    - MediaSourceDelegate was signalling that it had metadata before the 
    ChunkDemuxer was even initialized. This caused the HTMLMediaElement to
    signal that the load completed way too early and caused play() to be
    called when the delegate wasn't ready.
    
    BUG=233420
    TEST=webkitmediasource-play.html LayoutTest reliably runs w/o crashing now.
    
    Review URL: https://chromiumcodereview.appspot.com/15898002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202019 0039d316-1c4b-4281-b951-d872f2087c98
    34e4b51c
webmediaplayer_android.h 10.9 KB