microsoft / azure-percept-advanced-development

Azure Percept DK advanced topics
Other
69 stars 34 forks source link

Fix disconnecting H.264 stream multiple times #62

Closed MaxStrange closed 2 years ago

MaxStrange commented 2 years ago

This commit fixes an issue where we are accidentally disconnecting the H.264 stream twice as soon as clients disconnect. This bug doesn't really cause any problems, but it does cause us to print something about disconnecting twice to the log, when we are only supposed to be disconnecting once.

Also added some sanity checks on timestamps and reverted the accidental change to the way we alocated memory for the raw stream's frames.

Finally, added a unique appsrc identifier to each appsrc. This is necessary for the H264 disconnecting fix mentioned above, but is also a nice-to-have in case we want to reference a specific appsrc.