RE: vb2 queue setup skipped when playing bigger video

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Wednesday, June 08, 2011 10:54 AM Uwe Kleine-König wrote:

> I'm writing a driver for a video overlay device and have the problem
> that if I first playback a video with a resolution of say 320x240 and
> then another one with 640x400 the buffers allocated for the first
> playback are too small, but my .queue_setup callback isn't called.
> 
> I think the culprit is the following line in vb2_reqbufs()
> (drivers/media/video/videobuf2-core.c):
> 
> 	/*
> 	 * If the same number of buffers and memory access method is
> requested
> 	 * then return immediately.
> 	 */
> 	if (q->memory == req->memory && req->count == q->num_buffers)
> 		return 0;
> 
> which exits vb2_reqbufs before
> 
> 	ret = call_qop(q, queue_setup, q, &num_buffers, &num_planes,
> 		       plane_sizes, q->alloc_ctx);
> 
> Reading the vb1 code, this shortcut isn't implemented there.
> 
> As I'm quite new to all that v4l2 stuff, I'm not sure what to do.
> Just removing the return 0 (i.e. reverting 31901a07) seems to do the
> right thing for me.
> 
> Thoughts?

You are definitely right. I've missed the case that the format might
have changed in-between the reqbufs() calls. My commit 31901a07 is
completely wrong indeed, I've simplified it too much. I will send
revert soon.

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center



--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux