Fix waiting for IDR frames