dusty-nv / jetson-utils

C++/CUDA/Python multimedia utilities for NVIDIA Jetson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Kajatin opened this issue · comments

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:

int gstBufferManager::Dequeue( void** output, imageFormat format, uint64_t timeout )

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:

CUDA(cudaDeviceSynchronize()); // TODO replace with cudaStream?

Thanks!