So far Massachusetts is the only state to explicitly uphold a conviction for recording on-duty cops, and Illinois and Massachusetts are the only states where it is clearly illegal. The Illinois law has yet to be considered by the state’s Supreme Court, while the Massachusetts law has yet to be upheld by a federal appeals court. Maryland Attorney General Douglas Gansler recently issued an opinion concluding that arrests for recording cops are based on a misreading of the state’s wiretapping statute, but that opinion isn’t binding on local prosecutors.
In the remaining 47 states, the law is clearer: It is generally legal to record the police, as long as you don’t physically interfere with them. You may be unfairly harassed, questioned, or even arrested, but it’s unlikely you will be charged, much less convicted. (These are general observations and should not be treated as legal advice.)