]> git.karo-electronics.de Git - linux-beck.git/commit
[media] vb2: add allow_zero_bytesused flag to the vb2_queue struct
authorKamil Debski <k.debski@samsung.com>
Mon, 23 Feb 2015 12:26:17 +0000 (09:26 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 10 Apr 2015 12:46:07 +0000 (09:46 -0300)
commitf61bf13b6a07a93b9348e77808d369803f40b681
tree44ab9d2d33ff1c70cc3d5798a70a913b342737e6
parent06e7a9b638467fddf8f62ca9f07adc7754319461
[media] vb2: add allow_zero_bytesused flag to the vb2_queue struct

The vb2: fix bytesused == 0 handling (8a75ffb) patch changed the behavior
of __fill_vb2_buffer function, so that if bytesused is 0 it is set to the
size of the buffer. However, bytesused set to 0 is used by older codec
drivers as as indication used to mark the end of stream.

To keep backward compatibility, this patch adds a flag passed to the
vb2_queue_init function - allow_zero_bytesused. If the flag is set upon
initialization of the queue, the videobuf2 keeps the value of bytesused
intact in the OUTPUT queue and passes it to the driver.

Reported-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-core.c
include/media/videobuf2-core.h