microsoft / FFmpegInterop

This is a code sample to make it easier to use FFmpeg in Windows applications.
Apache License 2.0
1.29k stars 310 forks source link

Memory leak in UncompressedVideoSampleProvider #179

Closed brabebhin closed 6 years ago

brabebhin commented 6 years ago

The field bellow leaks memory m_rgVideoBufferData

Also, in destructor

if (m_rgVideoBufferData)
    {
        av_freep(m_rgVideoBufferData);
    }

is wrong, because it will only free the first pointer of the matrix. It should be av_freep(m_rgVideoBufferData[0])... according to docs. I will test and see if this approach fixes the leak

brabebhin commented 6 years ago

After a closer investigation, seems to be related to #172 Samples have wrong presentation time stamp. @khouzam maybe we should finally merge the time stamp PRs and start doing some nonregression tests?