theori-io / nrsc5

NRSC-5 receiver for rtl-sdr
Other
805 stars 100 forks source link

Don't touch the worker thread in pipe mode #327

Closed argilo closed 1 year ago

argilo commented 1 year ago

This is an alternative to #325.

As noted there, if nrsc5_start is accidentally called after entering pipe mode with nrsc5_open_pipe, then the (unnecessary) worker thread enters into a busy loop. Here I've updated the API functions to skip all worker thread code in the pipe mode, so that API users can safely call nrsc5_start regardless of the mode. It will simply do nothing in the pipe mode.

TheDaChicken commented 1 year ago

Fixes the problem for me! 👍better fix than my quick-fix.