summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-blackbird.c
diff options
context:
space:
mode:
authorCatalin Climov <devnull@localhost>2005-09-10 12:04:22 +0000
committerCatalin Climov <devnull@localhost>2005-09-10 12:04:22 +0000
commitea1865f47cafb682459b344438331f97e60ddce3 (patch)
tree3df02b8c62172bfac28d11d764374a52385384dd /linux/drivers/media/video/cx88/cx88-blackbird.c
parent55aee0625043a4cc35db2e9fdea83ccad535a835 (diff)
downloadmediapointer-dvb-s2-ea1865f47cafb682459b344438331f97e60ddce3.tar.gz
mediapointer-dvb-s2-ea1865f47cafb682459b344438331f97e60ddce3.tar.bz2
* cx88-blackbird.c:
- fixed gcc 4.0 compile warnings by moving var declarations to the top of the function or block. Signed-off-by: Catalin Climov <catalin@climov.com>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-blackbird.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index cb9f5b350..bff84dca2 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-blackbird.c,v 1.35 2005/09/06 21:58:43 catalin Exp $
+ * $Id: cx88-blackbird.c,v 1.36 2005/09/10 12:04:22 catalin Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -786,6 +786,7 @@ static const int BITRATES_SIZE = ARRAY_SIZE(mpeg_audio_bitrates);
static void blackbird_set_default_params(struct cx8802_dev *dev)
{
struct v4l2_mpeg_compression *params = &dev->params;
+ u32 au_params;
/* assign stream type */
if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) )
@@ -832,7 +833,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
/* assign audio properties */
/* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */
- u32 au_params = BLACKBIRD_AUDIO_BITS_STEREO |
+ au_params = BLACKBIRD_AUDIO_BITS_STEREO |
/* BLACKBIRD_AUDIO_BITS_BOUND_4 | */
BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE |
BLACKBIRD_AUDIO_BITS_CRC_OFF |
@@ -866,12 +867,14 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
}
if( params->au_bitrate.mode )
{
+ int layer;
+
if( params->au_bitrate.mode == V4L2_BITRATE_CBR )
params->au_bitrate.max = params->vi_bitrate.target;
else
params->au_bitrate.target = params->vi_bitrate.max;
- int layer = params->au_type;
+ layer = params->au_type;
if( params->au_bitrate.target == 0 )
{
/* TODO: use the minimum possible bitrate instead of 0 ? */
@@ -951,6 +954,8 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
#define UPDATE_PARAM( name ) dev->params.name = params->name
void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *params)
{
+ u32 au_params;
+
/* assign stream type */
if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) )
params->st_type = V4L2_MPEG_PS_2;
@@ -1020,7 +1025,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
/* assign audio properties */
/* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */
- u32 au_params = BLACKBIRD_AUDIO_BITS_STEREO |
+ au_params = BLACKBIRD_AUDIO_BITS_STEREO |
/* BLACKBIRD_AUDIO_BITS_BOUND_4 | */
BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE |
BLACKBIRD_AUDIO_BITS_CRC_OFF |
@@ -1054,12 +1059,14 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
}
if( params->au_bitrate.mode )
{
+ int layer;
+
if( params->au_bitrate.mode == V4L2_BITRATE_CBR )
params->au_bitrate.max = params->vi_bitrate.target;
else
params->au_bitrate.target = params->vi_bitrate.max;
- int layer = params->au_type;
+ layer = params->au_type;
if( params->au_bitrate.target == 0 )
{
/* TODO: use the minimum possible bitrate instead of 0 ? */