GIF patents are expired I believe, but I dont' think MP3 is safe until 2018.
This patent, for example, doesn't expire until near the end of 2017: https://www.google.com/patents/US5703999?dq=5,703,999
Edit: This is supported by the wikipedia article: https://en.wikipedia.org/wiki/MP3#Licensing.2C_ownership_and...
> In the United States, the technology will be substantially patent-free on 31 December 2017 (see below). The majority of MP3 patents expired in the US between 2007 and 2015