opus: avoid NULL pointer dereference
ogg: fix order of frees