media: rpivid: Fix H265 aux ent reuse of the same slot
authorJohn Cox <jc@kynesim.co.uk>
Thu, 24 Jun 2021 13:43:49 +0000 (14:43 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:16 +0000 (16:04 +0000)
commit7340c75e03b0faa9c948a55afecf1b1d9145034e
tree9c80ade5170f89a0068ab61b1d238bb5d0c7ad4d
parent4b7cf03fc0a51349e8cee0283281e83aef5ed688
media: rpivid: Fix H265 aux ent reuse of the same slot

It is legitimate, though unusual, for an aux ent associated with a slot
to be selected in phase 0 before a previous selection has been used and
released in phase 2. Fix such that if the slot is found to be in use
that the aux ent associated with it is reused rather than an new aux
ent being created. This fixes a problem where when the first aux ent
was released the second was lost track of.

This bug spotted in Nick's testing. It may explain some other occasional,
unreliable decode error reports where dmesg included "Missing DPB AUX
ent" logging.

Signed-off-by: John Cox <jc@kynesim.co.uk>
drivers/staging/media/rpivid/rpivid_h265.c