state_ = status.is_ok() ? STATE_NORMAL : STATE_ERROR;
+ // Re-enable fallback to software after reinitialization. This is the last
+ // place we can clear that state, and as such is the least likely to interfere
+ // with the rest of the fallback algorithm.
+ decoder_produced_a_frame_ = false;
+
if (reset_cb_) {
std::move(reset_cb_).Run();
return;
return;
}
- // Re-enable fallback to software after reinitialization. This is the last
- // place we can clear that state, and as such is the least likely to interfere
- // with the rest of the fallback algorithm.
- // TODO(tguilbert): investigate setting this flag at an earlier time. This
- // could fix the hypothetical edge case of receiving a decode error when
- // flushing the decoder during a seek operation.
- decoder_produced_a_frame_ = false;
-
// We may still have too many |ready_outputs_| or |unprepared_outputs_| to
// initiate another read to the demuxer stream. If so, the read will be
// initiated later once we vended enough outputs to read again.