diff options
author | Mike Isely <devnull@localhost> | 2006-01-03 05:51:57 +0000 |
---|---|---|
committer | Mike Isely <devnull@localhost> | 2006-01-03 05:51:57 +0000 |
commit | 36a955eea2987c936a99c8e9b3444adab1a4a2f1 (patch) | |
tree | 28fb42ec0babaff8b445ab869f7e1015657fca64 | |
parent | 82fd6647322e382719712588c0890ad11629d0ff (diff) | |
download | mediapointer-dvb-s2-36a955eea2987c936a99c8e9b3444adab1a4a2f1.tar.gz mediapointer-dvb-s2-36a955eea2987c936a99c8e9b3444adab1a4a2f1.tar.bz2 |
Fix video standard initialization bug
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
-rw-r--r-- | v4l/ChangeLog | 9 | ||||
-rw-r--r-- | v4l_experimental/pvrusb2/pvrusb2-hdw.c | 41 |
2 files changed, 27 insertions, 23 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 42e2b2027..2930e4bb8 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,12 @@ +2006-01-03 05:50 mcisely + + * v4l_experimental/pvrusb2/pvrusb2-hdw.c: + (pvr2_hdw_commit_ctl_internal): + -Fix problem with capture resolution being incorrectly set at + initialization for certain video standards. + + Signed-off-by: Mike Isely <isely@pobox.com> + 2006-01-03 05:46 mcisely * v4l_experimental/pvrusb2/pvrusb2-i2c-core.c: (pvr2_i2c_xfer): diff --git a/v4l_experimental/pvrusb2/pvrusb2-hdw.c b/v4l_experimental/pvrusb2/pvrusb2-hdw.c index bde8cdfca..9bd6ae885 100644 --- a/v4l_experimental/pvrusb2/pvrusb2-hdw.c +++ b/v4l_experimental/pvrusb2/pvrusb2-hdw.c @@ -1,6 +1,6 @@ /* * - * $Id: pvrusb2-hdw.c,v 1.6 2006/01/01 08:26:03 mcisely Exp $ + * $Id: pvrusb2-hdw.c,v 1.7 2006/01/03 05:51:57 mcisely Exp $ * * Copyright (C) 2005 Mike Isely <isely@pobox.com> * @@ -1416,29 +1416,24 @@ int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw) but if the user has pending changes there, then let the changes take priority. */ if (hdw->controls[PVR2_CID_VIDEOSTANDARD].dirty) { - if (!hdw->controls[PVR2_CID_VRES].dirty) { - /* Rewrite the vertical resolution to be - appropriate to the video standard that has been - selected. */ - int nvres = hdw->controls[PVR2_CID_VRES].value; - switch (hdw->controls[PVR2_CID_VIDEOSTANDARD].value) { - case PVR2_CVAL_VIDEOSTANDARD_NTSC_M: - case PVR2_CVAL_VIDEOSTANDARD_PAL_M: - nvres = 480; - break; - default: - nvres = 576; - } - if (nvres != hdw->controls[PVR2_CID_VRES].value) { - hdw->controls[PVR2_CID_VRES].value = nvres; - hdw->controls[PVR2_CID_VRES].dirty = !0; - } + /* Rewrite the vertical resolution to be appropriate to the + video standard that has been selected. */ + int nvres = hdw->controls[PVR2_CID_VRES].value; + switch (hdw->controls[PVR2_CID_VIDEOSTANDARD].value) { + case PVR2_CVAL_VIDEOSTANDARD_NTSC_M: + case PVR2_CVAL_VIDEOSTANDARD_PAL_M: + nvres = 480; + break; + default: + nvres = 576; } - if (!hdw->controls[PVR2_CID_INTERLACE].dirty) { - if (!hdw->controls[PVR2_CID_INTERLACE].value) { - hdw->controls[PVR2_CID_INTERLACE].value = 0; - hdw->controls[PVR2_CID_INTERLACE].dirty = !0; - } + if (nvres != hdw->controls[PVR2_CID_VRES].value) { + hdw->controls[PVR2_CID_VRES].value = nvres; + hdw->controls[PVR2_CID_VRES].dirty = !0; + } + if (!hdw->controls[PVR2_CID_INTERLACE].value) { + hdw->controls[PVR2_CID_INTERLACE].value = 0; + hdw->controls[PVR2_CID_INTERLACE].dirty = !0; } } |