theori-io / nrsc5

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

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

Closed argilo closed 12 months ago

argilo commented 12 months 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 12 months ago

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