[FFmpeg-devel] [PATCH]Silence some icc warnings in libavdevice
Carl Eugen Hoyos
cehoyos
Tue Apr 14 11:40:47 CEST 2009
Hi!
Attached patch silences four warnings about mixing an enumerated type with
another type when compiling libavdevice.
If ok, I'd apply in several steps following cosmetic changes.
Please comment, Carl Eugen
-------------- next part --------------
Index: libavdevice/alsa-audio-common.c
===================================================================
--- libavdevice/alsa-audio-common.c (revision 18507)
+++ libavdevice/alsa-audio-common.c (working copy)
@@ -43,9 +43,9 @@
}
}
-av_cold int ff_alsa_open(AVFormatContext *ctx, int mode,
+av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
unsigned int *sample_rate,
- int channels, int *codec_id)
+ int channels, enum CodecID *codec_id)
{
AlsaData *s = ctx->priv_data;
const char *audio_device;
Index: libavdevice/alsa-audio-dec.c
===================================================================
--- libavdevice/alsa-audio-dec.c (revision 18507)
+++ libavdevice/alsa-audio-dec.c (working copy)
@@ -57,7 +57,7 @@
AVStream *st;
int ret;
unsigned int sample_rate;
- int codec_id;
+ enum CodecID codec_id;
snd_pcm_sw_params_t *sw_params;
if (ap->sample_rate <= 0) {
Index: libavdevice/alsa-audio.h
===================================================================
--- libavdevice/alsa-audio.h (revision 18507)
+++ libavdevice/alsa-audio.h (working copy)
@@ -63,8 +63,8 @@
*
* @return 0 if OK, AVERROR_xxx on error
*/
-int ff_alsa_open(AVFormatContext *s, int mode, unsigned int *sample_rate,
- int channels, int *codec_id);
+int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode, unsigned int *sample_rate,
+ int channels, enum CodecID *codec_id);
/**
* Closes the ALSA PCM.
Index: libavdevice/jack_audio.c
===================================================================
--- libavdevice/jack_audio.c (revision 18507)
+++ libavdevice/jack_audio.c (working copy)
@@ -144,7 +144,7 @@
double o, period;
/* Register as a JACK client, using the context filename as client name. */
- self->client = jack_client_open(context->filename, 0, &status);
+ self->client = jack_client_open(context->filename, JackNullOption, &status);
if (!self->client) {
av_log(context, AV_LOG_ERROR, "Unable to register as a JACK client\n");
return AVERROR(EIO);
More information about the ffmpeg-devel
mailing list