media: hantro: Move copy_metadata() before doing a decode operation
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 16 Aug 2019 16:01:29 +0000 (13:01 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 19 Aug 2019 16:27:44 +0000 (13:27 -0300)
commit6c2eb77bf5667c0755f5a9a408f02f949925256d
tree3945c94288a7793f722e24f527a67e7b0a57e016
parent341772b82a3b83e7a7a2c0605c8c728e81b38319
media: hantro: Move copy_metadata() before doing a decode operation

Some decoders use intra slice/frame references. The capture buffer
pointed by these references might be new and thus have invalid
timestamp which prevents the decoder logic from retrieving the
vb2_buffer object based on the output buf timestamp.
Copy all metadata (including the timestamp) before starting the decode
operation.

Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/hantro/hantro_drv.c