Unable to cast
Solved
C++ Gurus
-
Hi, can you suggest me how to cast in "new style" the following line of code ((const uint8_t**)pAVFrame->data)?
Ret= swr_convert(pSwrContext, static_cast<uint8_t**>(&buffer), pAVFrame->nb_samples, (const uint8_t**)pAVFrame->data, pAVFrame->nb_samples);
int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in , int in_count);
pAVFrame->data is uint8_t *data[AV_NUM_DATA_POINTERS]; -
I too very much dislike c++ style casts... too fracking wordy to use them in places like
uint8_t c{ 0x43 }; cout << static_cast<int>(c); // would be shorter and just as obvious when done as cout << (int)c;