Skip to content

Commit

Permalink
[media] media v4l2-mem2mem: fix src/out and dst/cap num_rdy
Browse files Browse the repository at this point in the history
src bufs belong to out queue, dst bufs belong to in queue. Currently
this is not a real problem since all users currently need exactly one
input and one output buffer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sascha Hauer authored and Mauro Carvalho Chehab committed Sep 18, 2012
1 parent 36aee5f commit 961ae44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/media/v4l2-mem2mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx, struct vb2_buffer *vb);
static inline
unsigned int v4l2_m2m_num_src_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
{
return m2m_ctx->cap_q_ctx.num_rdy;
return m2m_ctx->out_q_ctx.num_rdy;
}

/**
Expand All @@ -150,7 +150,7 @@ unsigned int v4l2_m2m_num_src_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
static inline
unsigned int v4l2_m2m_num_dst_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
{
return m2m_ctx->out_q_ctx.num_rdy;
return m2m_ctx->cap_q_ctx.num_rdy;
}

void *v4l2_m2m_next_buf(struct v4l2_m2m_queue_ctx *q_ctx);
Expand Down

0 comments on commit 961ae44

Please sign in to comment.