Add missing initialization

The last commit lacks some variable initialization for the case
where there is no encoder. My mistake when I modified the original
patch. Thanks to Vivek for pointing this out.