Commit 76fc1f2d authored by Stefan Westerfeld's avatar Stefan Westerfeld

testhls: make HLSOutputStream throw away past-end samples (performance)

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent f0aca02f
......@@ -550,6 +550,10 @@ HLSOutputStream::write()
Error
HLSOutputStream::write_frames (const std::vector<float>& frames)
{
// if we don't need any more aac frames, just throw away samples (save cpu cycles)
if (m_keep_aac_frames == 0)
return Error::Code::NONE;
m_audio_buffer.write_frames (frames);
size_t delete_input = min (m_delete_input_start, m_audio_buffer.can_read_frames());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment