Merged non-LTS code from LTS branch into other repositories.
Fixed minor RTMP compile errors.