Merge pull request #421 from Ritesh-patel/master

fixed regenerate thumb  and fixed media count
Fix undefined variable in encoding
Merge branch 'master' of https://github.com/rtCamp/buddypress-media
Merge branch 'master' of https://github.com/rtCamp/rtMedia