Fixed bug with changing encode pixel format.

While I was updating the SwsContext, I was holding onto a reference to
the previous one, while dropping the new one.