Begin() will be called twice with 2-pass encodes, invoking y4m_input_open which allocates memory; close the old instance first. Change-Id: Id252a21d286ca9ae998bd87599d43aeb8d7d77aa
Change-Id: I826655a708010149de231ca31a2e3ba4f1842c0c
Change-Id: Ida3128e7e8a2ed333ac0b4ee92c23cb7dc1b7843