lavc/v4l2_m2m: don't close the file descriptor we don't own
authorPavel Koshevoy <pkoshevoy@gmail.com>
Mon, 2 Sep 2019 06:34:35 +0000 (00:34 -0600)
committerPavel Koshevoy <pkoshevoy@gmail.com>
Mon, 2 Sep 2019 17:28:43 +0000 (11:28 -0600)
commit6b57a294a32874c9cdc1de0310cbf1d693b4776f
tree95fc85f95377c5a3a8826f4ef5823445f837c7aa
parent7ea2710ec4d1b8920017c05fbb23c346e807e0f2
lavc/v4l2_m2m: don't close the file descriptor we don't own

ff_v4l2_m2m_create_context initialized V4L2m2mContext.fd to 0
which is a valid file descriptor value. Next ff_v4l2_m2m_codec_init
failed and v4l2_m2m_destroy_context closed file descriptor 0 even
though it didn't belong to V4L2m2mContext.

Signed-off-by: Pavel Koshevoy <pkoshevoy@gmail.com>
libavcodec/v4l2_m2m.c