Fixed a crash with DirectShow, caused by incorrect reference counting.