LibMedia: Don't change pipeline state from Error outside seeks

This commit is contained in:
Zaggy1024 2026-06-09 22:08:05 -05:00 committed by Gregory Bertilson
parent 5a120bff33
commit 47200f9e6d
2 changed files with 12 additions and 0 deletions

View file

@ -533,6 +533,12 @@ void DecodedAudioProducer::ThreadData::push_data_and_decode_a_block()
}
};
// If a prior seek encountered a decoding error, stop here to ensure that the pipeline state stays Error.
if (m_current_halting_status != PipelineStatus::Pending) {
set_halting_status_and_wait_for_seek(m_current_halting_status, {});
return;
}
auto sample_result = m_demuxer->get_next_sample_for_track(m_track);
if (sample_result.is_error()) {
if (sample_result.error().category() == DecoderErrorCategory::EndOfStream) {

View file

@ -527,6 +527,12 @@ void DecodedVideoProducer::ThreadData::push_data_and_decode_some_frames()
}
};
// If a prior seek encountered a decoding error, stop here to ensure that the pipeline state stays Error.
if (m_current_halting_status != PipelineStatus::Pending) {
set_halting_status_and_wait_for_seek(m_current_halting_status, {});
return;
}
auto sample_result = m_demuxer->get_next_sample_for_track(m_track);
if (sample_result.is_error()) {
if (sample_result.error().category() == DecoderErrorCategory::EndOfStream) {