I developed an application which relies on some Open Source codecs. The codecs resides in an external library. Should I publish my code if I'll not change the Open Source codec code but simple use it ? Can I use my app for commercial purposes?
Depends on the License of the codecs and how you link the library with your Application.
It will be nice if you read more about open source licenses, If the license compels you to publish your code under the license in which the codec is published, then you will have to give your code under open source license and publish it.
But that doesn't mean that you can't use your app for commercial purposes