removed deprecated function calls from libavcodec and libavformat,
replaced them with the suggested ones.