aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_shuffleplanes.c
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2020-07-16 10:52:12 -0400
committerAndriy Gelman <andriy.gelman@gmail.com>2020-07-16 11:25:23 -0400
commita9fecb8ea181d285a3218e27c97e5857925731d8 (patch)
treeb80345b18527b2a902e0488080a7e173a1e8ba39 /libavfilter/vf_shuffleplanes.c
parent660386813d34c1bdde685a3b8e0628a882d8cb22 (diff)
downloadffmpeg-a9fecb8ea181d285a3218e27c97e5857925731d8.tar.gz
avcodec/v4l2_m2m_dec: remove redundant packet and fix double free
v4l2_receive_frame() uses two packets s->buf_pkt and avpkt. If avpkt cannot be enqueued, the packet is buffered in s->buf_pkt and enqueued in the next call. Currently the ownership transfer between the two packets is not properly handled. A double free occurs if ff_v4l2_context_enqueue_packet() returns EAGAIN and v4l2_try_start returns EINVAL. In fact, having two AVPackets is not needed and everything can be handled by s->buf_pkt. This commit removes the local avpkt from v4l2_receive_frame(), meaning that the ownership transfer doesn't need to be handled and the double free is fixed. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavfilter/vf_shuffleplanes.c')
0 files changed, 0 insertions, 0 deletions