]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (5095): Pvrusb2: Allow VIDIOC_S_FMT with -1 for resolution values
authorPantelis Koukousoulas <pakt223@freemail.gr>
Sat, 20 Jan 2007 04:59:54 +0000 (01:59 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 21 Feb 2007 15:34:42 +0000 (13:34 -0200)
commit5a5a1f7a2e4f1d204cb3c831fc96da5561f677e8
treedad1c689e886bc030b95342e140c5e198cf92d36
parent8d83023416cac3df187fe90e95a71be63a658c86
V4L/DVB (5095): Pvrusb2: Allow VIDIOC_S_FMT with -1 for resolution values

With the previous patch, mplayer started but was polling the video
device forever without any video actually coming out. Further analysis
showed that it does a VIDIOC_S_FMT with width and height set to -1 (!!!).
The code handling this only cares that both are lower than the minimum
range allowed so it ends up setting the size to 19x17 (!!) This pretty
much breaks the encoder here. Even if this breakage is yet another (TM)
result of my setup, setting the size to 19x17 by default would surprise
most users IMHO.
So, special case for -1 and interpret this to be a request for the
default size, please. Users can then set their favorite size both
through mplayer and through sysfs.
With this patch, mplayer finally works in pvr:// mode (not that we
really gain anything over operating it through sysfs with lirc,
sometime I might actually get off my lazy a** and contribute this
setup too)

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pvrusb2/pvrusb2-v4l2.c