Browse Source

[media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR

changeset 70433a152f0 ("media: videobuf2: Refactor vb2_fileio_data
and vb2_thread") broke videobuf2-dvb.

The root cause is that, instead of calling threadio->fnc() for
all types of events except for VB2_BUF_STATE_ERROR, it was calling
it only for VB2_BUF_STATE_DONE.

With that, the DVB thread were never called.

Cc: stable@vger.kernel.org # Kernel >= 4.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab 9 years ago
parent
commit
1f2c450185
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/media/v4l2-core/videobuf2-core.c

+ 1 - 1
drivers/media/v4l2-core/videobuf2-core.c

@@ -2742,7 +2742,7 @@ static int vb2_thread(void *data)
 			break;
 		try_to_freeze();
 
-		if (vb->state == VB2_BUF_STATE_DONE)
+		if (vb->state != VB2_BUF_STATE_ERROR)
 			if (threadio->fnc(vb, threadio->priv))
 				break;
 		call_void_qop(q, wait_finish, q);