1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-26 09:33:30 +00:00

Error out when invalid format is specified

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15312 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-05-01 09:02:25 +00:00
parent fcb57df513
commit b7f3811b29

View File

@ -139,6 +139,10 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
}
case AF_CONTROL_COMMAND_LINE:{
int format = af_str2fmt_short(arg);
if (format == -1) {
af_msg(AF_MSG_ERROR, "[format] %s is not a valid format\n", (char *)arg);
return AF_ERROR;
}
if(AF_OK != af->control(af,AF_CONTROL_FORMAT_FMT | AF_CONTROL_SET,&format))
return AF_ERROR;
return AF_OK;