Skip to content

Commit b460fce

Browse files
author
Clement Champetier
committed
AudioFrame: add doc to warn about setNbSamplesPerChannel method
1 parent dfaf987 commit b460fce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/AvTranscoder/data/decoded/AudioFrame.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class AvExport AudioFrame : public IFrame
5656

5757
size_t getSize() const;
5858

59+
/**
60+
* @brief This methods dynamically updates the size that the data buffer would occupy if allocated.
61+
* @warning If the data buffer is already allocated, this could lead to memory leaks or seg fault.
62+
*/
5963
void setNbSamplesPerChannel(const size_t nbSamples) { _frame->nb_samples = nbSamples; }
6064

6165
void assignBuffer(const unsigned char* ptrValue);

0 commit comments

Comments
 (0)