[FFmpeg-devel] [PATCH] lavd/oss: support for more than 2 channels
Alexander Strasser
eclipse7 at gmx.net
Mon Jul 23 01:09:21 CEST 2012
Hi,
Nicolas George wrote:
> Le quintidi 5 thermidor, an CCXX, Reimar Döffinger a écrit :
[...]
>
> In the meantime, I can propose the attached patch, to make things clearer.
>
[...]
> --- a/libavdevice/oss_audio.c
> +++ b/libavdevice/oss_audio.c
> @@ -61,6 +61,13 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi
> int tmp, err;
> char *flip = getenv("AUDIO_FLIP_LEFT");
>
> + if (s->channels > 2) {
> + av_log(s1, AV_LOG_ERROR, "%d channels not yet supported.\n", s->channels);
> + if (is_output)
> + av_log(s1, AV_LOG_ERROR, "You can add the '-ac 2' option to let ffmpeg downmix to stereo.\n");
> + return AVERROR_PATCHWELCOME;
> + }
While your patch seems sensible. I think this is not the right place
for the hint on command line usage. Not sure if it is easy to implement
the command line usage hint outside of lavd...
[...]
Alexander
More information about the ffmpeg-devel
mailing list