packetstream: retry if sem_wait() fails

This is required for running glc-play on 64-bit systems.

Found the solution by debugging and coincidence as it worked by slowing down
operations by running strace on glc-play.

Signed-off-by: Sebastian Riemer <sebastian.riemer@gmx.de>