-
- Downloads
media: fix mismatched free and double free
FFmpeg frees and reallocs the buffer multiple times internally, which
means 2 things:
1. Mismatched free, as std::vector uses new, FFmpeg uses free.
2. buf_ no longer points to the correct address by the time it goes out
of scope; it points to an already freed part of memory.
Use a local variable instead of a class member to store the initial
buffer.
Change-Id: Ibe98658e68bec1b69875e6679ba1319dd7d98706
Reviewed-by:
Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Loading
Please register or sign in to comment