1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00
FFmpeg/libavutil
Aaron Levinson 0c1c514643 avutil/hwcontext_dxva2: Don't improperly free IDirect3DSurface9 objects
Add dxva2_pool_release_dummy() and use it in call to
av_buffer_create() in dxva2_pool_alloc().

Prior to this change, av_buffer_create() was called with NULL for the
third argument, which indicates that av_buffer_default_free() should
be used to free the buffer's data.  Eventually, it gets to
buffer_pool_free() and calls buf->free() on a surface object (which is
av_buffer_default_free()).

This can result in a crash when the debug version of the C-runtime is
used on Windows.  While it doesn't appear to result in a crash when
the release version of the C-runtime is used on Windows, it likely
results in memory corruption, since av_free() is being called on
memory that was allocated using
IDirectXVideoAccelerationService::CreateSurface().

Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
2017-05-16 21:45:52 +01:00
..
2015-12-15 14:16:28 +01:00
2016-10-02 19:35:55 +02:00
2016-10-02 19:35:55 +02:00
2016-02-18 11:55:00 +01:00
2016-05-04 18:16:21 +02:00
2017-01-30 11:04:31 +01:00
2016-06-03 14:49:56 +02:00
2016-01-13 20:00:19 -05:00
2017-05-15 11:30:36 +02:00
2016-08-02 07:50:44 -07:00
2016-11-23 02:01:05 +01:00
2017-03-20 08:02:30 +01:00
2016-01-28 19:49:48 -08:00
2016-08-02 21:52:40 -07:00
2016-10-21 23:58:47 +02:00
2017-05-15 11:30:36 +02:00