summaryrefslogtreecommitdiffstats
path: root/video/csputils.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-02 23:54:08 +0200
committerwm4 <wm4@nowhere>2015-04-02 23:54:08 +0200
commit5a2825ec35446ae2127c0fb204203cd09738c4ed (patch)
tree90e24f12b16912e1ce2894f28839e716653066d2 /video/csputils.h
parent19f56e20979d1dbbb4b9956c955d4d0fa27516aa (diff)
downloadmpv-5a2825ec35446ae2127c0fb204203cd09738c4ed.tar.bz2
mpv-5a2825ec35446ae2127c0fb204203cd09738c4ed.tar.xz
video: cleanup stereo mode parsing
Use OPT_CHOICE_C() instead of the custom parser. The functionality is pretty much equivalent. (On a side note, it seems --video-stereo-mode can't be removed, because it controls whether to "reduce" stereo video to mono, which is also the default. In fact I'm not sure how this should be handled at all.)
Diffstat (limited to 'video/csputils.h')
-rw-r--r--video/csputils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/csputils.h b/video/csputils.h
index 14acf03be5..449d883ecb 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -104,10 +104,10 @@ enum mp_stereo3d_mode {
MP_STEREO3D_COUNT = 13, // 12 is last valid mode
};
-extern const char *const mp_stereo3d_names[MP_STEREO3D_COUNT];
+extern const struct m_opt_choice_alternatives mp_stereo3d_names[];
+
+#define MP_STEREO3D_NAME(x) m_opt_choice_str(mp_stereo3d_names, x)
-#define MP_STEREO3D_NAME(x) \
- ((x) >= 0 && (x) < MP_STEREO3D_COUNT ? (char *)mp_stereo3d_names[(x)] : NULL)
#define MP_STEREO3D_NAME_DEF(x, def) \
(MP_STEREO3D_NAME(x) ? MP_STEREO3D_NAME(x) : (def))