mirror of
https://github.com/mpv-player/mpv
synced 2025-01-20 06:11:10 +00:00
Always initialize pUnk pointer with zero.
Should fix accidental crashes in various dshow/vfm binary codecs, caused by attempting to release unallocated data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24363 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
67276cc8cd
commit
72d755e7dd
@ -526,6 +526,7 @@ CMediaSample* CMediaSampleCreate(IMemAllocator* allocator, int _size)
|
||||
This->vt = (IMediaSample_vt*) malloc(sizeof(IMediaSample_vt));
|
||||
This->own_block = (char*) malloc((size_t)_size + SAFETY_ACEL);
|
||||
This->media_type.pbFormat = 0;
|
||||
This->media_type.pUnk = 0;
|
||||
|
||||
if (!This->vt || !This->own_block)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user