For normal non-multiplanar output formats b.num_planes was never set to 1,
so fill_buffer_from_file() wouldn't actually read any data from a file, since
b.num_planes was uninitialized (usually 0).
The same situation for capture formats was handled correctly, it was only the
output that failed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
fill_buffer_from_file(b, buf.index, fin);
}
else {
+ b.num_planes = 1;
b.planes[i][0].length = buf.length;
buf.bytesused = buf.length;
if (b.memory == V4L2_MEMORY_MMAP) {