File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/AvTranscoder/data/decoded Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,9 @@ void AudioFrame::allocateAVSample(const AudioFrameDesc& desc)
100
100
void AudioFrame::assign (const unsigned char value)
101
101
{
102
102
// Create the audio buffer
103
+ // The buffer will be freed in destructor of based class
103
104
const int audioSize = getSize ();
104
- unsigned char audioBuffer[audioSize];
105
+ unsigned char * audioBuffer = new unsigned char [audioSize];
105
106
memset (audioBuffer, value, audioSize);
106
107
107
108
// Fill the picture
Original file line number Diff line number Diff line change @@ -90,8 +90,9 @@ void VideoFrame::allocateAVPicture(const VideoFrameDesc& desc)
90
90
void VideoFrame::assign (const unsigned char value)
91
91
{
92
92
// Create the image buffer
93
+ // The buffer will be freed in destructor of based class
93
94
const int imageSize = getSize ();
94
- unsigned char imageBuffer[imageSize];
95
+ unsigned char * imageBuffer = new unsigned char [imageSize];
95
96
memset (imageBuffer, value, imageSize);
96
97
97
98
// Fill the picture
You can’t perform that action at this time.
0 commit comments