(In reply to C.M.Chang[:chunmin] from comment #3) > It seems returning the error breaks lot of things: https://treeherder.mozilla.org/jobs?repo=try&revision=e85c79108f0dff77506a6f87a0bad8fc494a0949&selectedTaskRun=WU5gMuNmQPuQ56uf8pcr7Q.0. > > The alternative is to have an parameter indicating if the decode error should be ignored in `Drain(aIgnoreError = true)`. The default value can be `true` so most of the code won't be changed, and we don't set it to `false` in WebCodecs case. Maybe it's because the *EOF* error from [`avcodec_send_packet`](https://searchfox.org/mozilla-central/rev/10f46c9c638e0e5935ed9fa12aadc9d0d4e71ade/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp#1097,1105) in `FFmpegVideoDecoder` returns `NS_ERROR_DOM_MEDIA_DECODE_ERR`, instead of `NS_ERROR_DOM_MEDIA_END_OF_STREAM`. The `FFmpegAudioDecoder` returns `NS_ERROR_DOM_MEDIA_END_OF_STREAM` in this case. If that's the cause of the failure, D205780 can be removed.
Bug 1839993 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to C.M.Chang[:chunmin] from comment #3) > It seems returning the error breaks lot of things: https://treeherder.mozilla.org/jobs?repo=try&revision=e85c79108f0dff77506a6f87a0bad8fc494a0949&selectedTaskRun=WU5gMuNmQPuQ56uf8pcr7Q.0. > > The alternative is to have an parameter indicating if the decode error should be ignored in `Drain(aIgnoreError = true)`. The default value can be `true` so most of the code won't be changed, and we don't set it to `false` in WebCodecs case. Maybe it's because the *EOF* error from [`avcodec_send_packet`](https://searchfox.org/mozilla-central/rev/10f46c9c638e0e5935ed9fa12aadc9d0d4e71ade/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp#1097,1105) in `FFmpegVideoDecoder` returns `NS_ERROR_DOM_MEDIA_DECODE_ERR`, instead of `NS_ERROR_DOM_MEDIA_END_OF_STREAM`. The `FFmpegAudioDecoder` returns [`NS_ERROR_DOM_MEDIA_END_OF_STREAM`](https://searchfox.org/mozilla-central/rev/10f46c9c638e0e5935ed9fa12aadc9d0d4e71ade/dom/media/platforms/ffmpeg/FFmpegAudioDecoder.cpp#338) in this case. If that's the cause of the failure, D205780 can be removed.