File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/AvTranscoder/data/decoded Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ size_t AudioFrame::getDataSize() const
98
98
99
99
void AudioFrame::allocateData ()
100
100
{
101
+ if (_dataAllocated)
102
+ LOG_WARN (" The AudioFrame seems to already have allocated data. This could lead to memory leaks." )
103
+
101
104
// Set Frame properties
102
105
av_frame_set_sample_rate (_frame, _desc._sampleRate );
103
106
av_frame_set_channels (_frame, _desc._nbChannels );
Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ size_t VideoFrame::getDataSize() const
83
83
84
84
void VideoFrame::allocateData ()
85
85
{
86
+ if (_dataAllocated)
87
+ LOG_WARN (" The VideoFrame seems to already have allocated data. This could lead to memory leaks." )
88
+
86
89
// Set Frame properties
87
90
_frame->width = _desc._width ;
88
91
_frame->height = _desc._height ;
You can’t perform that action at this time.
0 commit comments