Skip to content

Commit

Permalink
fix(iridium-extractor): handle stdin correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec42 committed Nov 15, 2020
1 parent 47df7f6 commit 48cdeaf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/iridium_extractor_flowgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ def match_gain(gain, gain_names):
else:
raise RuntimeError("Unknown sample format for offline mode given")

file_source = blocks.file_source(itemsize=itemsize, filename=self._filename, repeat=False)
if self._filename == '/dev/stdin':
file_source = blocks.file_descriptor_source(itemsize=itemsize, fd=0, repeat=False)
else:
file_source = blocks.file_source(itemsize=itemsize, filename=self._filename, repeat=False)

if converter:
multi = blocks.multiply_const_cc(scale)
Expand Down

0 comments on commit 48cdeaf

Please sign in to comment.