Replace some deprecated avcodec_* calls with corresponding new av_* calls