dusty-nv / jetson-utils

C++/CUDA/Python multimedia utilities for NVIDIA Jetson
MIT License
737 stars 289 forks source link

Missing `cudaDeviceSynchronize()` in `gstBufferManager::Deque()` #198

Open Kajatin opened 9 months ago

Kajatin commented 9 months ago

Hello,

This is not as much an issue as it is a question. I was wondering how come there is no (need to) call cudaDeviceSynchronize() at the end of the following function: https://github.com/dusty-nv/jetson-utils/blob/e6ea7550049c9907ca537a91584462942a510806/codec/gstBufferManager.cpp#L299

There are some color conversions going on that are never synced as far as I can tell. I also noticed that in the gstEncoder::Render(), which has a very similar implementation, there is a call to synchronize: https://github.com/dusty-nv/jetson-utils/blob/e6ea7550049c9907ca537a91584462942a510806/codec/gstEncoder.cpp#L716

Thanks!