summaryrefslogtreecommitdiffstats
path: root/mpvcore/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-25 18:23:40 +0200
committerwm4 <wm4@nowhere>2013-08-26 10:09:41 +0200
commit53b5227270ff21c0f4c8aeb8c33a9f4dcbe20600 (patch)
tree6a34e81c038c740e7dfcf11aadcc49b87d125ca5 /mpvcore/options.c
parent58e826e6f27a17ca1a2325e9987d234cf7408fdd (diff)
downloadmpv-53b5227270ff21c0f4c8aeb8c33a9f4dcbe20600.tar.bz2
mpv-53b5227270ff21c0f4c8aeb8c33a9f4dcbe20600.tar.xz
audio: make internal audio format 0 an invalid format
Having to use -1 for that is generally quite annoying. Audio formats are created from bitmasks, and it can't be excluded that 0 is not a valid format. Fix this by adjusting AF_FORMAT_I so that it is never 0. Along with AF_FORMAT_F and the special formats, all valid formats are covered and guaranteed to be non-0. It's possible that this commit will cause some regressions, as the check for invalid audio formats changes a bit.
Diffstat (limited to 'mpvcore/options.c')
-rw-r--r--mpvcore/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpvcore/options.c b/mpvcore/options.c
index eeda836914..733b104a46 100644
--- a/mpvcore/options.c
+++ b/mpvcore/options.c
@@ -802,7 +802,7 @@ const struct MPOpts mp_default_opts = {
.sub_pos = 100,
.sub_speed = 1.0,
.audio_output_channels = MP_CHMAP_INIT_STEREO,
- .audio_output_format = -1, // AF_FORMAT_UNKNOWN
+ .audio_output_format = 0, // AF_FORMAT_UNKNOWN
.playback_speed = 1.,
.movie_aspect = -1.,
.field_dominance = -1,