]> git.sesse.net Git - ffmpeg/commit
avcodec: v4l2_m2m: fix races around freeing data on close
authorMark Thompson <sw@jkqxz.net>
Tue, 9 Jan 2018 22:56:41 +0000 (23:56 +0100)
committerMark Thompson <sw@jkqxz.net>
Sun, 21 Jan 2018 00:37:35 +0000 (00:37 +0000)
commita0c624e299730c8c5800375c2f5f3c6c200053ff
tree6a7b9312d0b25d9a65d160d62165675d4985bdfb
parent6c1c6c6c71fc776c6dd25d13861b036dad2cdc1b
avcodec: v4l2_m2m: fix races around freeing data on close

Refcount all of the context information. This also fixes a potential
segmentation fault when accessing freed memory  (buffer returned after
the codec has been closed).

Tested-by: Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
libavcodec/v4l2_buffers.c
libavcodec/v4l2_buffers.h
libavcodec/v4l2_m2m.c
libavcodec/v4l2_m2m.h
libavcodec/v4l2_m2m_dec.c
libavcodec/v4l2_m2m_enc.c