summaryrefslogtreecommitdiffstats
path: root/audio/filter
diff options
context:
space:
mode:
Diffstat (limited to 'audio/filter')
-rw-r--r--audio/filter/af.c19
-rw-r--r--audio/filter/af.h9
-rw-r--r--audio/filter/af_bs2b.c9
-rw-r--r--audio/filter/af_center.c9
-rw-r--r--audio/filter/af_channels.c9
-rw-r--r--audio/filter/af_delay.c9
-rw-r--r--audio/filter/af_drc.c9
-rw-r--r--audio/filter/af_dummy.c9
-rw-r--r--audio/filter/af_equalizer.c9
-rw-r--r--audio/filter/af_export.c9
-rw-r--r--audio/filter/af_extrastereo.c9
-rw-r--r--audio/filter/af_hrtf.c9
-rw-r--r--audio/filter/af_hrtf.h9
-rw-r--r--audio/filter/af_karaoke.c9
-rw-r--r--audio/filter/af_ladspa.c9
-rw-r--r--audio/filter/af_lavcac3enc.c9
-rw-r--r--audio/filter/af_lavrresample.c23
-rw-r--r--audio/filter/af_pan.c9
-rw-r--r--audio/filter/af_scaletempo.c9
-rw-r--r--audio/filter/af_sinesuppress.c9
-rw-r--r--audio/filter/af_sub.c9
-rw-r--r--audio/filter/af_surround.c11
-rw-r--r--audio/filter/af_sweep.c9
-rw-r--r--audio/filter/af_volume.c9
-rw-r--r--audio/filter/dsp.h9
-rw-r--r--audio/filter/equalizer.h9
-rw-r--r--audio/filter/filter.c9
-rw-r--r--audio/filter/filter.h9
-rw-r--r--audio/filter/tools.c9
-rw-r--r--audio/filter/window.c9
-rw-r--r--audio/filter/window.h9
31 files changed, 143 insertions, 162 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c
index 8d29e332a8..7a6aef0959 100644
--- a/audio/filter/af.c
+++ b/audio/filter/af.c
@@ -1,19 +1,18 @@
/*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -505,6 +504,15 @@ static int af_fix_rate(struct af_stream *s, struct af_instance **p_af,
return AF_OK;
}
+static void reset_formats(struct af_stream *s)
+{
+ for (struct af_instance *af = s->first; af; af = af->next) {
+ af->control(af, AF_CONTROL_SET_RESAMPLE_RATE, &(int){0});
+ af->control(af, AF_CONTROL_SET_CHANNELS, &(struct mp_chmap){0});
+ af->control(af, AF_CONTROL_SET_FORMAT, &(int){0});
+ }
+}
+
// Return AF_OK on success or AF_ERROR on failure.
// Warning:
// A failed af_reinit() leaves the audio chain behind in a useless, broken
@@ -515,6 +523,7 @@ static int af_reinit(struct af_stream *s)
{
remove_auto_inserted_filters(s);
af_chain_forget_frames(s);
+ reset_formats(s);
s->first->fmt_in = s->first->fmt_out = s->input;
// Start with the second filter, as the first filter is the special input
// filter which needs no initialization.
diff --git a/audio/filter/af.h b/audio/filter/af.h
index 65a30f7dd1..fb5f74b253 100644
--- a/audio/filter/af.h
+++ b/audio/filter/af.h
@@ -1,19 +1,18 @@
/*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MPLAYER_AF_H
diff --git a/audio/filter/af_bs2b.c b/audio/filter/af_bs2b.c
index 78f197a7a6..10d6f4e3fc 100644
--- a/audio/filter/af_bs2b.c
+++ b/audio/filter/af_bs2b.c
@@ -4,21 +4,20 @@
*
* Copyright (c) 2009 Andrew Savchenko
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <bs2b.h>
diff --git a/audio/filter/af_center.c b/audio/filter/af_center.c
index ff2a37dee9..69e54e81c6 100644
--- a/audio/filter/af_center.c
+++ b/audio/filter/af_center.c
@@ -8,21 +8,20 @@
*
* copyright (c) 2005 Alex Beregszaszi
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_channels.c b/audio/filter/af_channels.c
index 22be38a31d..57fe4874ef 100644
--- a/audio/filter/af_channels.c
+++ b/audio/filter/af_channels.c
@@ -5,21 +5,20 @@
*
* Original author: Anders
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_delay.c b/audio/filter/af_delay.c
index 8de26ece77..8d1cca8a72 100644
--- a/audio/filter/af_delay.c
+++ b/audio/filter/af_delay.c
@@ -5,21 +5,20 @@
*
* Original author: Anders
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_drc.c b/audio/filter/af_drc.c
index 2560658f45..4344766349 100644
--- a/audio/filter/af_drc.c
+++ b/audio/filter/af_drc.c
@@ -1,21 +1,20 @@
/*
* Copyright (C) 2004 Alex Beregszaszi & Pierre Lombard
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_dummy.c b/audio/filter/af_dummy.c
index 3d3ec27654..341ec7e3cb 100644
--- a/audio/filter/af_dummy.c
+++ b/audio/filter/af_dummy.c
@@ -4,21 +4,20 @@
*
* Original author: Anders
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_equalizer.c b/audio/filter/af_equalizer.c
index f5d47c8e3a..781239c02a 100644
--- a/audio/filter/af_equalizer.c
+++ b/audio/filter/af_equalizer.c
@@ -6,21 +6,20 @@
*
* Copyright (C) 2001 Anders Johansson ajh@atri.curtin.edu.au
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_export.c b/audio/filter/af_export.c
index fb5503f0af..f2613530e5 100644
--- a/audio/filter/af_export.c
+++ b/audio/filter/af_export.c
@@ -9,21 +9,20 @@
*
* Authors: Anders; Gustavo Sverzut Barbieri <gustavo.barbieri@ic.unicamp.br>
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_extrastereo.c b/audio/filter/af_extrastereo.c
index 4b39793e09..49222ebfdc 100644
--- a/audio/filter/af_extrastereo.c
+++ b/audio/filter/af_extrastereo.c
@@ -1,21 +1,20 @@
/*
* Copyright (C) 2004 Alex Beregszaszi & Pierre Lombard
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_hrtf.c b/audio/filter/af_hrtf.c
index 1496f8b634..94a1599cd0 100644
--- a/audio/filter/af_hrtf.c
+++ b/audio/filter/af_hrtf.c
@@ -5,21 +5,20 @@
*
* Author: ylai
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <stdio.h>
diff --git a/audio/filter/af_hrtf.h b/audio/filter/af_hrtf.h
index a654dc4f98..9ba9858aaf 100644
--- a/audio/filter/af_hrtf.h
+++ b/audio/filter/af_hrtf.h
@@ -1,19 +1,18 @@
/*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MPLAYER_AF_HRTF_H
diff --git a/audio/filter/af_karaoke.c b/audio/filter/af_karaoke.c
index f69b936811..0c8dc626d7 100644
--- a/audio/filter/af_karaoke.c
+++ b/audio/filter/af_karaoke.c
@@ -4,21 +4,20 @@
* copyright (c) 2006 Reynaldo H. Verdejo Pinochet
* Based on code by Alex Beregszaszi for his 'center' filter.
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_ladspa.c b/audio/filter/af_ladspa.c
index 6a8cd802f6..bd54dbb267 100644
--- a/audio/filter/af_ladspa.c
+++ b/audio/filter/af_ladspa.c
@@ -4,21 +4,20 @@
* Written by Ivo van Poorten <ivop@euronet.nl>
* Copyright (C) 2004, 2005
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
/* ------------------------------------------------------------------------- */
diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c
index 3ced241c62..a1651a0276 100644
--- a/audio/filter/af_lavcac3enc.c
+++ b/audio/filter/af_lavcac3enc.c
@@ -3,21 +3,20 @@
*
* Copyright (C) 2007 Ulion <ulion A gmail P com>
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c
index 9e4a8adaaa..41d5a8bdf4 100644
--- a/audio/filter/af_lavrresample.c
+++ b/audio/filter/af_lavrresample.c
@@ -2,22 +2,22 @@
* Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
* Copyright (c) 2013 Stefano Pigozzi <stefano.pigozzi@gmail.com>
*
- * This file is part of mpv.
* Based on Michael Niedermayer's lavcresample.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * This file is part of mpv.
+ *
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
@@ -264,12 +264,12 @@ static int configure_lavrr(struct af_instance *af, struct mp_audio *in,
static int control(struct af_instance *af, int cmd, void *arg)
{
- struct af_resample *s = (struct af_resample *) af->priv;
- struct mp_audio *in = (struct mp_audio *) arg;
- struct mp_audio *out = (struct mp_audio *) af->data;
+ struct af_resample *s = af->priv;
switch (cmd) {
case AF_CONTROL_REINIT: {
+ struct mp_audio *in = arg;
+ struct mp_audio *out = af->data;
struct mp_audio orig_in = *in;
if (((out->rate == in->rate) || (out->rate == 0)) &&
@@ -298,10 +298,11 @@ static int control(struct af_instance *af, int cmd, void *arg)
return r;
}
case AF_CONTROL_SET_FORMAT: {
- if (af_to_avformat(*(int*)arg) == AV_SAMPLE_FMT_NONE)
+ int format = *(int *)arg;
+ if (format && af_to_avformat(format) == AV_SAMPLE_FMT_NONE)
return AF_FALSE;
- mp_audio_set_format(af->data, *(int*)arg);
+ mp_audio_set_format(af->data, format);
return AF_OK;
}
case AF_CONTROL_SET_CHANNELS: {
@@ -309,7 +310,7 @@ static int control(struct af_instance *af, int cmd, void *arg)
return AF_OK;
}
case AF_CONTROL_SET_RESAMPLE_RATE:
- out->rate = *(int *)arg;
+ af->data->rate = *(int *)arg;
return AF_OK;
case AF_CONTROL_SET_PLAYBACK_SPEED_RESAMPLE: {
s->playback_speed = *(double *)arg;
diff --git a/audio/filter/af_pan.c b/audio/filter/af_pan.c
index 979e4721e1..900d10cc74 100644
--- a/audio/filter/af_pan.c
+++ b/audio/filter/af_pan.c
@@ -1,21 +1,20 @@
/*
* Copyright (C) 2002 Anders Johansson ajh@atri.curtin.edu.au
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c
index ad8e520601..131dc5d511 100644
--- a/audio/filter/af_scaletempo.c
+++ b/audio/filter/af_scaletempo.c
@@ -14,21 +14,20 @@
*
* Copyright (c) 2007 Robert Juliano
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
diff --git a/audio/filter/af_sinesuppress.c b/audio/filter/af_sinesuppress.c
index 32e074d508..2418262f5d 100644
--- a/audio/filter/af_sinesuppress.c
+++ b/audio/filter/af_sinesuppress.c
@@ -3,21 +3,20 @@
* Copyright (C) 2004 Alex Beregszaszi
* based upon af_extrastereo.c by Pierre Lombard
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * MPlayer is distributed in the hope that it will be useful,
+ * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/audio/filter/af_sub.c b/audio/filter/af_sub.c
index 243c9cef70..82aa77f4a4 100644
--- a/audio/filter/af_sub.c
+++ b/audio/filter/af_sub.c
@@ -1,21 +1,20 @@
/*
* Copyright (C) 2002 Anders Johansson ajh@watri.uwa.edu.au
*
- * This file is part of MPlayer.
+ * This file is part of mpv.
*
- * MPlayer is free software; you can redistribute it and/or modify
+ * mpv is free software; you can redistribute it and/or modify