Closed Bug 1238878 Opened 5 years ago Closed 5 years ago
Do Flush command after EOS for MSE
MediaFormatReader could send more data after calling Drain (send EOS in OmxDataDecoder) in MSE case. In OMX, it won't accept any input after EOS, to fix it, we need to call flush command to reset decoder .  spec 184.108.40.206 OMX_CommandFlush: "When a port is flushed, the component shall reset any internal state associated with the port so as to be ready to process from another location within the stream after the flush."
I found this bug when trying dom/media/mediasource/test/test_BufferingWait_mp4.html.
Do you think the MediaFormatReader should always issue a Flush() command after a drain? Right now, following a drain, it may simply re-seek in the media and start feeding new data to the decoder.
(In reply to Jean-Yves Avenard [:jya] from comment #3) > Do you think the MediaFormatReader should always issue a Flush() command > after a drain? > > Right now, following a drain, it may simply re-seek in the media and start > feeding new data to the decoder. Yes, it'd be better IMHO.
1. Refine log 2. call flush after eos
Attachment #8706815 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8706815 [details] [diff] [review] reset_decoder_after_eos LGTM.
Attachment #8706815 - Flags: review?(sotaro.ikeda.g) → review+
After this patch, all 2015 MSE tests  are passed. (you need to press play button in test 20 and 42 due to preload is off on b2g IIRC)  http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2015.html?timestamp=1452850350917
You need to log in before you can comment on or make changes to this bug.