Skip to content

Commit

Permalink
Do not output zeroes while buffering as it breaks process mode
Browse files Browse the repository at this point in the history
  • Loading branch information
vladisslav2011 committed Apr 5, 2024
1 parent efb3185 commit ae3d4eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/interfaces/file_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,15 @@ int file_source::work(int noutput_items,
d_buffering = true;
if(d_buffering)
{
//d_reader_ready.wait(guard);
d_reader_ready.wait(guard);
if(d_wp == d_rp)
return 0;
#if 0
//output zeroes while we are buffering
guard.unlock();
memset(o, 0, d_itemsize * noutput_items);
return noutput_items;
#endif
}
uint64_t bytes_avail = (d_wp >= d_rp) ? (d_wp - d_rp):
(&d_buf.data()[d_buf.size()] - d_rp);
Expand Down

0 comments on commit ae3d4eb

Please sign in to comment.