aws-samples / amazon-kinesis-video-streams-producer-embedded-c

Light-wight Amazon Kinesis Video Streams Producer SDK For FreeRTOS/Embedded Linux
Apache License 2.0
29 stars 18 forks source link

Fix busy looping when no frame available as connection established. #29

Closed weichihl closed 2 years ago

weichihl commented 2 years ago

As connection established, it'll flush frames until there is a key frame. If there is no frames available, it'll make the doWork as a busy loop.

This solution checks if there is nothing to do, then delay a little.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.