options: add "choice" option type, use for -pts-association-mode
commit7e366113f75c696ae2b32f5faa5f80ec3fca96b8
authorUoti Urpala <uau@glyph.nonexistent.invalid>
Fri, 17 Dec 2010 23:00:28 +0000 (18 01:00 +0200)
committerUoti Urpala <uau@glyph.nonexistent.invalid>
Sat, 18 Dec 2010 08:14:25 +0000 (18 10:14 +0200)
treea205a59524df6a617c8a33afb17cce983a6a2901
parent00c2bafb0ac25a9c5ce845f49f6718b06ff03bbe
options: add "choice" option type, use for -pts-association-mode

Add a "choice" option type. Options of this type take a string as
input and set an int option variable to the value corresponding to the
string. The string->int mapping is option-specific and is given in the
option definition. Strings not found in the mapping are rejected as
invalid option values.

Change the option -pts-association-mode to use this new option type
and accept values "auto, decoder, sort" instead of "0, 1, 2". The
change in accepted values shouldn't cause problems as this option is
not appropriate to use in normal user config files.
DOCS/man/en/mplayer.1
cfg-mplayer.h
m_option.c
m_option.h