1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00
FFmpeg/libavcodec
Andriy Gelman a9fecb8ea1 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>
2020-07-16 11:25:23 -04:00
..
2020-07-03 23:28:26 +02:00
2020-06-10 12:36:44 +02:00
2020-07-04 16:27:24 +01:00
2020-07-03 23:28:26 +02:00
2020-07-08 23:09:29 +08:00
2020-06-05 18:14:17 +02:00
2020-06-14 18:20:37 +02:00
2020-06-15 04:22:28 +02:00
2020-07-03 23:28:26 +02:00
2020-06-14 18:20:37 +02:00
2020-06-08 20:45:56 +02:00
2020-07-05 19:59:49 +02:00
2020-07-06 18:23:50 +01:00